{
  "openapi": "3.2.0",
  "info": {
    "title": "Compliance API",
    "description": "The Compliance REST API. Every call acts as exactly one User, in the one Account the credential is in now, with that User's full power.\n\nSign in with one of two credentials, sent as `Authorization: Bearer <credential>`:\n\n- **Agent connection** (`agentConnection`): OAuth 2 authorization code with PKCE at Auth, for the resource `https://demo.mvdm.io/compliance/api`.\n- **Personal token** (`personalToken`): a `mvdm_pat_…` token a User creates on Auth.\n\nBoth are managed on [API & Agent Access](https://auth.mvdm.io/User/AgentAccess). Every error is ProblemDetails (RFC 9457) with a stable `type` token. v1 only grows: a breaking change ships as `/api/v2/` beside it.\n\nFor a walk-through, read [the REST guide](https://demo.mvdm.io/compliance/agents/rest); to connect an Agent or the CLI, see [the setup guides](https://demo.mvdm.io/compliance/agents).",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://demo.mvdm.io/compliance"
    }
  ],
  "paths": {
    "/api/v1/assets/{id}/comments": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "List an Asset's Comments",
        "description": "Every Comment on the Asset, oldest first: whole-Asset Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "assets.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Comment on an Asset",
        "description": "Adds a Comment as you. Without `phrase` it is on the Asset as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on an Asset, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies the Custodian and anyone Mentioned.",
        "operationId": "assets.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Assets"
        ],
        "summary": "Edit a Comment on an Asset",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Asset Comment cannot become a Phrase Comment.",
        "operationId": "assets.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Assets"
        ],
        "summary": "Delete a Comment on an Asset",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "assets.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "List Assets",
        "description": "Lists the Asset register with OData query options over stored fields (camelCase): `$filter` (e.g. `lifecycleState eq 'Active' and kind eq 'Hardware'`, `carriesAssetAccessReview eq true`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Active`, `Information`). `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (reviews, the Asset access review) come from the single get.",
        "operationId": "assets.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Create an Asset",
        "description": "Records an Asset (numbered AST-###). `name` is required; `kind` defaults to `Information`, which needs a `classification`. `descriptionHtml` defaults to the Account's Asset description Default content for the Asset's `kind`. `ownerKind` defaults to `Organisation`; `Person` or `Supplier` needs `ownerId`. Omit `custodianKind` to be the Custodian yourself as a Person; a live Asset must have a Custodian, and joins that Custodian's Asset Review. `lifecycleState` defaults to `Active`; `Retired` and `ReturnedToOwner` record an Asset already gone and need `leftInventoryAt` (and `ReturnedToOwner` an owner other than the Organisation). Asset access review (first review due in 30 days) is on for a live Asset that gets at least one `accessRightRoleIds` entry unless you send `carriesAssetAccessReview: false`; `carriesAssetAccessReview: true` turns it on without Access rights; an Asset created `Retired` or `ReturnedToOwner` never carries it. `accessRightRoleIds` names the Roles that may get into the Asset (omit for none); an id that is not a Role of this Account answers 422, and so does any Role id on a `Hardware` Asset, which is handed out to a person and never holds Access rights. Only an `Information` Asset has a Retention period: send `retentionUnit` `Months` or `Years` with `retentionLength` (1 to 999) and `retentionStartingEvent` (at most 100 characters), or `Indefinitely` with neither; a period on any other `kind` answers 422. Answers 201 with the new Asset.",
        "operationId": "assets.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAssetCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAssetCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAssetCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets/{id}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get an Asset",
        "description": "Returns the whole Asset with what its Details page shows: the owning Person or Supplier, the Custodian's next Asset Review due, the review opt-out state and history, recent completed Asset Reviews and their count, and the Asset access review block (last reviewed, next due, the open task, and recent completions), and the Risks and Vulnerabilities that name the Asset (`risks`, `vulnerabilities`, as the Asset's tabs list them).",
        "operationId": "assets.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Assets"
        ],
        "summary": "Change an Asset",
        "description": "Changes the fields you send and keeps the rest; `null` clears `descriptionHtml`, `classification` (not on an `Information` Asset), `location`, `externalReference`, or `acquiredAt`. `lifecycleState` moves between `Planned`, `Active`, and `Decommissioning`: a change into, out of, or between `Retired` and `ReturnedToOwner` answers 422 naming the action to call instead (`POST /api/v1/assets/{id}/retire`, `/return-to-owner`, or `/reactivate`). A live Asset keeps a Custodian; a Custodian change moves the Asset to that Custodian's Asset Review and hands over its open Asset access review. `leftInventoryAt` only corrects the date an end-state Asset already has. `accessRightRoleIds` replaces the whole set of Roles that may get into the Asset; `null` or `[]` clears it, omitting it keeps it, and an id that is not a Role of this Account answers 422. An Asset that is `Hardware` after the change answers 422 while it has Roles, so send `accessRightRoleIds` as `[]` when you change `kind` to `Hardware`. Giving a live Asset that has no Access rights its first one turns Asset access review on, and clearing every Access right leaves it as it is. Only an `Information` Asset has a Retention period: `retentionUnit` `Months` or `Years` needs `retentionLength` (1 to 999) and `retentionStartingEvent` (at most 100 characters), `Indefinitely` drops both, and `null` clears the whole period; a period on any other `kind` answers 422. Changing `kind` away from `Information` without naming a period clears it.",
        "operationId": "assets.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAssetUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAssetUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAssetUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Assets"
        ],
        "summary": "Delete an Asset",
        "description": "Permanently deletes an Asset recorded in error, with its open review tasks, and rebuilds its Custodian's Asset Review. To record that a real Asset left the inventory, Retire it or Return it to its owner instead. An Asset still referenced elsewhere (for example by a Vulnerability) answers 409.",
        "operationId": "assets.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets/{id}/retire": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Retire an Asset",
        "description": "Records that the Asset was disposed of today, whoever owns it: `lifecycleState` `Retired`, `leftInventoryAt` today, and it leaves its Custodian's Asset Review and pauses its Asset access review. A Retired Asset answers 409.",
        "operationId": "assets.retire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets/{id}/return-to-owner": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Return an Asset to its owner",
        "description": "Records that the Asset went back intact to the Person or Supplier who owns it, today: `lifecycleState` `ReturnedToOwner`, `leftInventoryAt` today, and its reviews stop as for Retire. An Organisation-owned Asset has nobody to return to and answers 422; one already Returned to owner answers 409.",
        "operationId": "assets.return-to-owner",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets/{id}/reactivate": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Reactivate an Asset",
        "description": "Returns a Retired or Returned-to-owner Asset to `Active`, clearing `leftInventoryAt`; it rejoins its Custodian's Asset Review, and its Asset access review resumes when it still carries one. An Asset with no Custodian answers 422 (set one with PATCH first); a still-held Asset answers 409.",
        "operationId": "assets.reactivate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets/{id}/turn-on-access-review": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Turn on an Asset's access review",
        "description": "Starts the periodic Asset access review (who has access to this Asset) for its Custodian, with the first review due in 30 days. Already on is a no-op. An Asset in an end state answers 409.",
        "operationId": "assets.turn-on-access-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets/{id}/turn-off-access-review": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Turn off an Asset's access review",
        "description": "Stops the Asset access review and cancels its open task; past completed reviews stay on the Asset. Already off is a no-op. An Asset in an end state answers 409.",
        "operationId": "assets.turn-off-access-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets/{id}/opt-out": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Opt an Asset out of Asset Review",
        "description": "Takes the Asset out of its Custodian's Asset Review and records your `reason` (required) in the opt-out history. An Asset in an end state is no longer reviewed, so it answers 409. Resume with `POST /api/v1/assets/{id}/resume-review`.",
        "operationId": "assets.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/assets/{id}/resume-review": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Resume an Asset's Asset Review",
        "description": "Ends the Asset's review opt-out, so it rejoins its Custodian's Asset Review. An Asset that is not opted out, or is in an end state, answers 409.",
        "operationId": "assets.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAsset"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/attachments": {
      "get": {
        "tags": [
          "Attachments"
        ],
        "summary": "List Attachments",
        "description": "Lists the Account's Attachments with OData query options over stored fields (camelCase): `$filter` (e.g. `contentType eq 'application/pdf'`), `$select` (e.g. `title,originalFilename,byteSize,sourceUrl`), `$orderby` (e.g. `createdAt desc`), `$expand`, `$top` (default 50, at most 200), and `$skip`. A link has no file, so its file fields are null; `sourceUrl` is the web address of a link or of a copied PDF. Every row carries `id` and `url`; an Attachment has no page of its own, so `url` downloads the file of a file Attachment and is null for a link. The record each is filed on comes from the single get. `nextOffset` is the `$skip` for the next page, or null on the last one.",
        "operationId": "attachments.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Attachments"
        ],
        "summary": "File an upload or a web address as an Attachment",
        "description": "Files a finished upload with target `attachment` (at most 50 MiB), or a web address, on one record, as the Attachment upload page and the Add link page do. Give exactly one of `uploadId` and `webAddress`: neither or both answers 422 on `uploadId`. A `webAddress` is a full `http` or `https` address of at most 2048 characters (another value answers 422 on `webAddress`). When it serves a PDF of at most 50 MiB, the PDF is fetched and filed as a file Attachment that keeps `webAddress` as its source; otherwise the Attachment is a link with no file, and a failed fetch never fails the call. `title` and `target` (`{ type, id }`) are required. `target.type` is one of `Supplier`, `Person`, `Asset`, `Incident`, `Vulnerability`, `Event`, `Role`, `Customer`, or `Change`; another kind answers 422 on `target.type`, and a record that does not exist answers 422 on `target.id`. The content type comes from the upload's file name. An upload that is unknown, unfinished, already used, for another target, or another User's answers 422 on `uploadId`. Answers 201 with the new Attachment.",
        "operationId": "attachments.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAttachmentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAttachmentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAttachmentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAttachment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/attachments/{id}": {
      "get": {
        "tags": [
          "Attachments"
        ],
        "summary": "Get an Attachment",
        "description": "Returns the Attachment: title, description, the stored file name, content type, size, and SHA-256, its `webAddress` (the web page a link points at, or the address a copied PDF came from), and the record it is filed on (`filedOn`). A link has no file, so its file fields and `url` are null. `url` downloads the bytes of a file.",
        "operationId": "attachments.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAttachment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Attachments"
        ],
        "summary": "Remove an Attachment",
        "description": "Permanently deletes the Attachment and its stored file, as Remove in a record's Attached files panel does. An Attachment lives on one record only, so there is no detach. The record it was filed on stays.",
        "operationId": "attachments.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/attachments/{id}/file": {
      "get": {
        "tags": [
          "Attachments"
        ],
        "summary": "Download an Attachment file",
        "description": "Streams the file a person uploaded, or the PDF Compliance copied from a web address, with its stored content type, and its stored file name in `Content-Disposition`. A link has no file, so it answers 404.",
        "operationId": "attachments.download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "$ref": "#/components/schemas/Stream"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}/comments": {
      "get": {
        "tags": [
          "Business Issues"
        ],
        "summary": "List a Business Issue's Comments",
        "description": "Every Comment on the Business Issue, oldest first: whole-issue Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "business-issues.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Comment on a Business Issue",
        "description": "Adds a Comment as you. Without `phrase` it is on the issue as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on a Business Issue, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "business-issues.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Edit a Comment on a Business Issue",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-issue Comment cannot become a Phrase Comment.",
        "operationId": "business-issues.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Delete a Comment on a Business Issue",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "business-issues.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues": {
      "get": {
        "tags": [
          "Business Issues"
        ],
        "summary": "List Business Issues",
        "description": "Lists the Business Issue register (the internal and external issues that shape the organisation's context) with OData query options over stored fields (camelCase): `$filter` (e.g. `status eq 'Active' and kind eq 'External'`, `contains(title, 'regulation')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Active`, `Regulatory`). `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (review, responses) come from the single get.",
        "operationId": "business-issues.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Create a Business Issue",
        "description": "Records a Business Issue (numbered BIS-###) and enrols it in Business Issue Review; you are recorded as its first reviewer. `title` is required. `kind` defaults to `Internal`, `status` to `Active`, and `raisedAt` to today. A Business Issue that has already passed can be created `Archived`, with `archivedAt`. Send `reviewOptOutReason` to opt it out of review from the start. Answers 201 with the new Business Issue.",
        "operationId": "business-issues.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiBusinessIssueCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiBusinessIssueCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiBusinessIssueCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}": {
      "get": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Get a Business Issue",
        "description": "Returns the whole Business Issue with what its Details page shows: the next Business Issue Review due and the review opt-out state and history, the Requirements it covers, and its responses (the Risks, Opportunities, Policies, Objectives, and Kpis raised because of it).",
        "operationId": "business-issues.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Change a Business Issue",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `category` or `descriptionHtml`. A real change counts as a Business Issue Review by you. `status` cannot change here: a change answers 422 naming the action to call instead (`POST /api/v1/business-issues/{id}/archive` or `/reactivate`). `archivedAt` only corrects the date of an archived issue.",
        "operationId": "business-issues.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiBusinessIssueUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiBusinessIssueUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiBusinessIssueUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Delete a Business Issue",
        "description": "Permanently deletes a Business Issue recorded in error, with its open review, its covered Requirements, and its response links (the responses themselves stay). To record that a real issue no longer applies, Archive it instead. A Business Issue still referenced elsewhere answers 409.",
        "operationId": "business-issues.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}/archive": {
      "post": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Archive a Business Issue",
        "description": "Records that the issue no longer shapes the context: status `Archived`, archived today, and its Business Issue Review paused (the open review task is cancelled). An archived issue answers 409.",
        "operationId": "business-issues.archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}/reactivate": {
      "post": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Reactivate a Business Issue",
        "description": "Returns an archived issue to `Active`, clearing its archiving date, and resumes its Business Issue Review (unless it is opted out). An active issue answers 409.",
        "operationId": "business-issues.reactivate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}/opt-out": {
      "post": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Opt a Business Issue out of Business Issue Review",
        "description": "Stops the issue's Business Issue Review: cancels the open review task and records your `reason` (required) in the opt-out history. An archived issue's review has already stopped, so it answers 409. Resume with `POST /api/v1/business-issues/{id}/resume-review`.",
        "operationId": "business-issues.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}/resume-review": {
      "post": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Resume a Business Issue's Business Issue Review",
        "description": "Ends the issue's review opt-out. When the Account's Business Issue Review Cadence is an interval, the next review is due that interval from today; under none it only clears the opt-out. An issue that is not opted out, or is archived, answers 409.",
        "operationId": "business-issues.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}/link-requirements": {
      "post": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Set the Requirements a Business Issue covers",
        "description": "Replaces the issue's covered Requirements with `requirements` (each `frameworkId` and `code`, e.g. `iso-27001-2022` and `4.1`); `[]` clears them. An added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. A link the issue already has may stay.",
        "operationId": "business-issues.link-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}/link-responses": {
      "post": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Set a Business Issue's responses",
        "description": "Replaces the Risks, Opportunities, Policies, Objectives, and Kpis raised because of the issue with `responses` (each `type` and `id`); `[]` clears them. Each response must name an existing record of that type, or the call answers 422 and changes nothing. The response's own Details page shows the issue under Arises from.",
        "operationId": "business-issues.link-responses",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkResponsesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkResponsesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkResponsesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/business-issues/{id}/remove-response": {
      "post": {
        "tags": [
          "Business Issues"
        ],
        "summary": "Remove one of a Business Issue's responses",
        "description": "Unlinks one response (`type` and `id`) from the issue; the response itself stays. A record that is not one of the issue's responses answers 404.",
        "operationId": "business-issues.remove-response",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiResponseKey"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiResponseKey"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiResponseKey"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBusinessIssue"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/changes/{id}/comments": {
      "get": {
        "tags": [
          "Changes"
        ],
        "summary": "List a Change's Comments",
        "description": "Every Comment on the Change, oldest first: whole-Change Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "changes.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Changes"
        ],
        "summary": "Comment on a Change",
        "description": "Adds a Comment as you. Without `phrase` it is on the Change as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); a Change takes Phrase Comments on `descriptionHtml`, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "changes.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/changes/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Changes"
        ],
        "summary": "Edit a Comment on a Change",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Change Comment cannot become a Phrase Comment.",
        "operationId": "changes.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Changes"
        ],
        "summary": "Delete a Comment on a Change",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "changes.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/changes": {
      "get": {
        "tags": [
          "Changes"
        ],
        "summary": "List Changes",
        "description": "Lists the Change register with OData query options over stored fields (camelCase): `$filter` (e.g. `state eq 'Closed'`, `contains(title, 'gateway')`, `changeDate ge 2026-12-01`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Open`, `Closed`). `nextOffset` is the `$skip` for the next page, or null on the last one. The Risks and Assets a Change names come from the single get.",
        "operationId": "changes.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Changes"
        ],
        "summary": "Record a Change",
        "description": "Records a Change (numbered CHG-###) in state `Open`; to record one that is already done, close it afterwards. `title` and `changeDate` (the day the Change takes effect, which may lie in the future) are required. `descriptionHtml` defaults to the Account's Change description Default content. `externalLink` is an optional absolute `http` or `https` URL of at most 2048 characters to the matching item in your tracker. `riskIds` and `assetIds` name the Risks and Assets the Change is about, all of this Account; one that is not answers 422 on that field. Answers 201 with the new Change.",
        "operationId": "changes.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChangeCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChangeCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChangeCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChange"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/changes/{id}": {
      "get": {
        "tags": [
          "Changes"
        ],
        "summary": "Get a Change",
        "description": "Returns the whole Change with what its Details page shows: its state (`Open` or `Closed`), its `changeDate`, `descriptionHtml`, `externalLink`, the ids of the Risks and Assets it names (`riskIds`, `assetIds`), and the Lifecycle action its state allows now (`allowedActions`: `close` or `reopen`).",
        "operationId": "changes.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChange"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Changes"
        ],
        "summary": "Delete a Change",
        "description": "Permanently deletes a Change recorded in error, with its Comments, Attachments, and Task links; the Risks and Assets it named stay. To record that a real Change is finished, close it instead.",
        "operationId": "changes.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Changes"
        ],
        "summary": "Change a Change",
        "description": "Changes the fields you send and keeps the rest; `null` clears `descriptionHtml` or `externalLink`. `externalLink` is an absolute `http` or `https` URL of at most 2048 characters. `riskIds` and `assetIds` each replace the whole set (`null` or `[]` clears it) and omitting one keeps its set; an id that is not of this Account answers 422 on that field. `state` never changes here: a different state answers 422 naming `POST /api/v1/changes/{id}/close` or `/reopen`.",
        "operationId": "changes.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChangeUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChangeUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChangeUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChange"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/changes/{id}/close": {
      "post": {
        "tags": [
          "Changes"
        ],
        "summary": "Close a Change",
        "description": "Moves an `Open` Change to `Closed`. Closing checks nothing and leaves `changeDate` as it is. A `Closed` Change answers 409.",
        "operationId": "changes.close",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChange"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/changes/{id}/reopen": {
      "post": {
        "tags": [
          "Changes"
        ],
        "summary": "Reopen a Change",
        "description": "Returns a `Closed` Change to `Open`. An `Open` Change answers 409.",
        "operationId": "changes.reopen",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChange"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/checks/{checkName}/start": {
      "post": {
        "tags": [
          "Checks"
        ],
        "summary": "Start a Check run",
        "description": "Starts one named Check over the Account's records, as the Checks page's Run check does. `checkName` is one of `UncoveredRisk`, `PolicyCoverageAdequacy`, `ProcedureImplementationAdequacy`, `DocumentMerge`, `DocumentSplit`, `SupplierDocuments`, or `SupplierVulnerabilities` (see `GET /api/v1/check-results` for the catalog). The run works in the background: poll `GET /api/v1/check-runs/{id}` until `status` is `Completed` or `Failed`, then read its results there or in the inbox. Answers the run. Only one run may be in flight per Account: another answers 409. A run spends the Assistant allowance: an empty allowance answers 402 `allowance-exhausted`. An unknown Check answers 404.",
        "operationId": "checks.start",
        "parameters": [
          {
            "name": "checkName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCheckRun"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "402": {
            "description": "`allowance-exhausted`: The Assistant allowance is empty.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "allowance-exhausted"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/check-runs/{id}": {
      "get": {
        "tags": [
          "Checks"
        ],
        "summary": "Get a Check run",
        "description": "The Check run's `status` (`InFlight`, `Completed`, or `Failed`) and, once it completed, its results still in the Checks inbox. Poll this after `POST /api/v1/checks/{checkName}/start`.",
        "operationId": "check-runs.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCheckRun"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/check-results": {
      "get": {
        "tags": [
          "Checks"
        ],
        "summary": "List the Checks inbox",
        "description": "The Checks inbox, as the Checks page lists it: every named Check with whether it has completed and whether its last completed run found nothing, the run in flight, and the current results of every Check. Each result names the records it is about, its `problem`, and its `suggestedChange`. Accept a result to work on it with our Assistant, or Decline it. Not paged.",
        "operationId": "check-results.list",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChecksInbox"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/check-results/{id}/accept": {
      "post": {
        "tags": [
          "Checks"
        ],
        "summary": "Accept a Check result",
        "description": "Starts a conversation of yours in which our Assistant works on the Check result with you, as the Checks page's Accept does. Accepting changes no record by itself and leaves the result in the inbox; the Assistant proposes the changes in the conversation. Answers the conversation; follow it with `GET /api/v1/conversations/{id}/messages?after=0&wait=60`. Spends the Assistant allowance: an empty allowance answers 402 `allowance-exhausted`.",
        "operationId": "check-results.accept",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiConversation"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "402": {
            "description": "`allowance-exhausted`: The Assistant allowance is empty.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "allowance-exhausted"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/check-results/{id}/decline": {
      "post": {
        "tags": [
          "Checks"
        ],
        "summary": "Decline a Check result",
        "description": "Declines the Check result for the whole Account, as the Checks page's Decline does: it leaves the inbox, and later runs stay quiet on that record while it has not changed. There is no reason and no undo. Answers 204.",
        "operationId": "check-results.decline",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/continuity-plans": {
      "get": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "List Continuity Plans",
        "description": "Lists the Continuity Plan register (the business continuity and disaster recovery plans) with OData query options over stored fields (camelCase): `$filter` (e.g. `scenario eq 'Cyberattack'`, `contains(title, 'office')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (review and test dates, the review opt-out, tests) come from the single get.",
        "operationId": "continuity-plans.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "Create a Continuity Plan",
        "description": "Records a Continuity Plan (numbered BCP-###) and enrols it in Plan Review on the Account's Cadence. It has no test clock until you give it a Continuity test Schedule (`POST /api/v1/schedules`). `title` is required; `scenario` defaults to `Other`. Omit `ownerKind` to own it yourself as a Person; send `null` for no Owner. `activityIds` names the Critical Activities it covers. Send `reviewOptOutReason` to opt it out of review from the start. Answers 201 with the new plan.",
        "operationId": "continuity-plans.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContinuityPlanCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContinuityPlanCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContinuityPlanCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiContinuityPlan"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/continuity-plans/{id}": {
      "get": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "Get a Continuity Plan",
        "description": "Returns the whole Continuity Plan with what its Details page shows: the Plan Review cadence (last reviewed, next due, the review opt-out and its history, and the recent completed reviews with their count), its testing (last tested, next due from the Continuity test Schedules pinned to it, those Schedules, and the recent Continuity test Events with their count), and the Critical Activities it covers.",
        "operationId": "continuity-plans.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiContinuityPlan"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "Change a Continuity Plan",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `planHtml` or the Owner. `activityIds` replaces the Critical Activities the plan covers (`null` or `[]` clears them); each must be an activity of the Account. A real change to the title, scenario, or plan counts as a Plan Review by you. A new Owner also becomes the default assignee of later review tasks.",
        "operationId": "continuity-plans.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContinuityPlanUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContinuityPlanUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContinuityPlanUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiContinuityPlan"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "Delete a Continuity Plan",
        "description": "Permanently deletes a never-tested Continuity Plan recorded in error, with its review cadence and open tasks and the Continuity test Schedules pinned to it (their open reminders are cancelled). A plan named by a Continuity test Event answers 409: tests cannot be unlinked or removed.",
        "operationId": "continuity-plans.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/continuity-plans/{id}/opt-out": {
      "post": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "Opt a Continuity Plan out of review",
        "description": "Pauses Plan Review: `act` is `Review` (the default). It cancels the open review task and records your `reason` (required) in the opt-out history. Resume with `POST /api/v1/continuity-plans/{id}/resume-review`. A plan's testing pauses on its Continuity test Schedules, with Cadence none.",
        "operationId": "continuity-plans.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContinuityPlanOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContinuityPlanOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContinuityPlanOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiContinuityPlan"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/continuity-plans/{id}/resume-review": {
      "post": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "Resume a Continuity Plan's review",
        "description": "Ends the plan's Plan Review opt-out. When the Account's Continuity Plan Review Cadence is an interval, the next review is due that interval from today; under none it only clears the opt-out. A plan whose review is not opted out answers 409.",
        "operationId": "continuity-plans.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiContinuityPlan"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/continuity-plans/{id}/comments": {
      "get": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "List a Continuity Plan's Comments",
        "description": "Every Comment on the plan, oldest first: whole-plan Comments (`phrase` null) and Phrase Comments on its plan text (`phrase.field` = `planHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "continuity-plans.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "Comment on a Continuity Plan",
        "description": "Adds a Comment as you. Without `phrase` it is on the plan as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `planHtml` takes Phrase Comments on a plan, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "continuity-plans.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/continuity-plans/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "Edit a Comment on a Continuity Plan",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-plan Comment cannot become a Phrase Comment.",
        "operationId": "continuity-plans.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Continuity Plans"
        ],
        "summary": "Delete a Comment on a Continuity Plan",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "continuity-plans.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/course-library": {
      "get": {
        "tags": [
          "Course library"
        ],
        "summary": "List the Course library",
        "description": "Lists every course mvdmio ships in the Course library, ordered by `slug`, in your UI language (`Accept-Language`, English or Dutch): `slug`, `version`, `title`, `description` (plain text), `category`, `lessonCount`, `questionCount`, and `passMarkPercent`. Every Account with a Compliance License can add any of them with `POST /api/v1/training-courses/from-library`.",
        "operationId": "course-library.list",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiLibraryCourse"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/course-library/{slug}": {
      "get": {
        "tags": [
          "Course library"
        ],
        "summary": "Get a Course library course",
        "description": "Returns the course as the list does, plus its `lessons` in order: `key`, `title`, and `bodyHtml`. The Quiz questions and their options are never returned, so a trainee cannot read them ahead of the Quiz. An unknown `slug` answers 404.",
        "operationId": "course-library.get",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiLibraryCourseDetails"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/critical-activities": {
      "get": {
        "tags": [
          "Critical Activities"
        ],
        "summary": "List Critical Activities",
        "description": "Lists the Critical Activity register (the business activities that must keep running, with their recovery targets) with OData query options over stored fields (camelCase): `$filter` (e.g. `rtoMinutes le 60`, `contains(name, 'payroll')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. `nextOffset` is the `$skip` for the next page, or null on the last one. The covering Continuity Plans come from the single get.",
        "operationId": "critical-activities.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Critical Activities"
        ],
        "summary": "Create a Critical Activity",
        "description": "Records a Critical Activity (numbered ACT-###). `name`, `rtoMinutes` (greater than zero), and `rpoMinutes` (zero or more; zero means no data loss is accepted) are required. Omit `ownerKind` to own it yourself as a Person; send `null` for no Owner. Link it to Continuity Plans from the plan side (`activityIds`). Answers 201 with the new activity.",
        "operationId": "critical-activities.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCriticalActivityCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCriticalActivityCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCriticalActivityCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCriticalActivity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/critical-activities/{id}": {
      "get": {
        "tags": [
          "Critical Activities"
        ],
        "summary": "Get a Critical Activity",
        "description": "Returns the whole Critical Activity with what its Details page shows: its recovery targets and the Continuity Plans that cover it, each with when it was last tested and when its next test is due.",
        "operationId": "critical-activities.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCriticalActivity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Critical Activities"
        ],
        "summary": "Change a Critical Activity",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `descriptionHtml` or the Owner.",
        "operationId": "critical-activities.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCriticalActivityUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCriticalActivityUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCriticalActivityUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCriticalActivity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/critical-activities/{id}/comments": {
      "get": {
        "tags": [
          "Critical Activities"
        ],
        "summary": "List a Critical Activity's Comments",
        "description": "Every Comment on the activity, oldest first: whole-activity Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "critical-activities.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Critical Activities"
        ],
        "summary": "Comment on a Critical Activity",
        "description": "Adds a Comment as you. Without `phrase` it is on the activity as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on an activity, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "critical-activities.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/critical-activities/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Critical Activities"
        ],
        "summary": "Edit a Comment on a Critical Activity",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-activity Comment cannot become a Phrase Comment.",
        "operationId": "critical-activities.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Critical Activities"
        ],
        "summary": "Delete a Comment on a Critical Activity",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "critical-activities.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/customers/{id}/comments": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "List a Customer's Comments",
        "description": "Every Comment on the Customer, oldest first. `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "customers.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Comment on a Customer",
        "description": "Adds a Comment on the Customer as you (rich text). Customers take no Phrase Comments, so a `phrase` answers 422. Notifies only the people Mentioned.",
        "operationId": "customers.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/customers/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Customers"
        ],
        "summary": "Edit a Comment on a Customer",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment.",
        "operationId": "customers.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Delete a Comment on a Customer",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "customers.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/customers": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "List Customers",
        "description": "Lists the Customer register (the organisations the Account sells to) with OData query options over stored fields (camelCase): `$filter` (e.g. `status eq 'Active'`, `contains(name, 'gemeente')`, `interestedPartyId eq <id>`), `$select`, `$orderby`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, `url`, and `securityContacts` (an array of `{ email, name }`), so one call returns every Customer's addresses; `$select` narrows the stored fields only. Enum values are member names (`Active`, `Archived`). `nextOffset` is the `$skip` for the next page, or null on the last one.",
        "operationId": "customers.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Create a Customer",
        "description": "Records a Customer (numbered CUS-###). `name` and `securityContacts` are required: at least one `{ email, name }`, each `email` a valid address, none repeated ignoring letter case (a repeat answers 422 on that entry's `securityContacts[i].email`). Addresses are stored lower-case. `interestedPartyId` must name an Interested Party of kind `Customer` in this Account. `status` defaults to `Active`; a tender prospect is recorded as `Active`. Answers 201 with the new Customer.",
        "operationId": "customers.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCustomerCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCustomerCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCustomerCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomer"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/customers/{id}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get a Customer",
        "description": "Returns the whole Customer: its fields, its Interested Party id, and its Security contacts.",
        "operationId": "customers.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomer"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Customers"
        ],
        "summary": "Change a Customer",
        "description": "Changes the fields you send and keeps the rest; `null` clears `descriptionHtml` and `interestedPartyId`. `securityContacts` replaces the whole set (at least one, under the same rules as create); without it the stored contacts stay. `status` cannot change here: a change answers 422 naming the action to call instead (`POST /api/v1/customers/{id}/archive` or `/reactivate`).",
        "operationId": "customers.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCustomerUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCustomerUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCustomerUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomer"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Delete a Customer",
        "description": "Permanently deletes a Customer recorded in error, with its Security contacts, Comments, Attachments, and Task links. To record that a real customer is gone, Archive it instead.",
        "operationId": "customers.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/customers/{id}/archive": {
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Archive a Customer",
        "description": "Records that the customer is gone: status `Archived`. It keeps its Security contacts and Attachments and can still be edited. An archived Customer answers 409.",
        "operationId": "customers.archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomer"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/customers/{id}/reactivate": {
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Reactivate a Customer",
        "description": "Returns an archived Customer to `Active`. An active Customer answers 409.",
        "operationId": "customers.reactivate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomer"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/events/{id}/comments": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "List an Event's Comments",
        "description": "Every Comment on the Event, oldest first: whole-Event Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "events.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Events"
        ],
        "summary": "Comment on an Event",
        "description": "Adds a Comment as you. Without `phrase` it is on the Event as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on an Event, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "events.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/events/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Events"
        ],
        "summary": "Edit a Comment on an Event",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Event Comment cannot become a Phrase Comment.",
        "operationId": "events.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Events"
        ],
        "summary": "Delete a Comment on an Event",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "events.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "List Events",
        "description": "Lists the Event register (the audits, reviews, inspections, gap analyses, tests, and meetings that took place) with OData query options over stored fields (camelCase): `$filter` (e.g. `kind eq 'InternalAudit'`, `occurredAt ge 2026-01-01`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. `nextOffset` is the `$skip` for the next page, or null on the last one. Targets, raised Findings and Vulnerabilities come from the single get.",
        "operationId": "events.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Events"
        ],
        "summary": "Record an Event",
        "description": "Records an Event of any kind but `PentestCampaign` (`RegulatoryInspection` by default), as the New Event page does. `title` is required; `occurredAt` defaults to today. `frameworkId` names an adopted Framework; a `GapAnalysis` needs one, and that Framework must already have recorded Requirement results. `scheduleId` counts the Event toward a Schedule of the same kind, and the Event takes the Schedule's Framework (send none, or the same one); without it the Event is a One-off and moves no due date. A counted Event that becomes the Schedule's latest completes its open Next occurrence task, and `taskId` names the open task to complete. A Schedule of another kind, Framework, or Continuity Plan, or a `taskId` that is not an open Next occurrence task of the Schedule, answers 422. A `ContinuityTest` takes `continuityTest`: its Plan, exercise type, and outcome are required, `conductedByUserId` defaults to you, and a `Failed` outcome needs `descriptionHtml`. `attendees` names who was at a Meeting, including guests with no login, and is refused on every other kind. Answers 201 with the new Event.",
        "operationId": "events.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEvent"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/events/{id}": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get an Event",
        "description": "Returns the whole Event with what its Details page shows: what it touched (its targets, each with code, title, and page), the Findings raised from it, and the Vulnerabilities discovered during it. `meeting` is deprecated and always null.",
        "operationId": "events.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEvent"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Events"
        ],
        "summary": "Change an Event",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `descriptionHtml`, `frameworkId`, `scheduleId` (a One-off), or `attendees`. A `GapAnalysis` cannot lose its Framework. `kind` changes the Event's kind to any kind `POST` accepts but `PentestCampaign`, which answers 422; the current kind is accepted and changes nothing. The Event's code follows the new kind's prefix (`MTG-0007` becomes, say, `AUD-0012`; a change between `InternalAudit` and `ExternalAudit` keeps it), a Meeting's attendees and a Continuity test's Plan and results are dropped when the Event leaves that kind, and Findings, Vulnerabilities, Targets, Comments, and Tasks stay attached. A `kind` that does not match the Event's Schedule answers 422 on `scheduleId` unless the same request sets `scheduleId` to a Schedule of the new kind or to `null`. A change into `ContinuityTest` must carry `continuityTest` with its `planId`, exercise type, and the rest, under the rules `POST` follows. A change into `GapAnalysis` needs an adopted Framework with recorded Requirement results, on the Event already or set in the same request. `scheduleId` counts the Event toward a Schedule of its kind; without `frameworkId` the Event takes that Schedule's Framework, and a counted Event cannot leave it. The old and the new Schedule's next occurrence are worked out again. `frameworkId` names an adopted Framework (or the one the Event already has). `attendees` names who was at a Meeting and is refused on every other kind; anyone who may edit the Event may change it. `continuityTest` changes a Continuity test's results, under the rules `POST` follows; once the Event is a Continuity test its Plan is fixed.",
        "operationId": "events.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEvent"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Events"
        ],
        "summary": "Delete an Event",
        "description": "Permanently deletes an Event recorded in error and cancels its open tasks. When it counted toward a Schedule, that Schedule's next occurrence is worked out again from its remaining counted Events. An Event still referenced elsewhere, such as by a Finding or a Vulnerability that points at it, answers 409.",
        "operationId": "events.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/events/{id}/targets": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "List an Event's targets",
        "description": "What the Event touched: each target's `type`, `id`, code, title, and page, who linked it, and why.",
        "operationId": "events.list-targets",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiEventTarget"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Events"
        ],
        "summary": "Link a target to an Event",
        "description": "Records that the Event touched a record, as the Add target page does. `type` is `Policy`, `Requirement`, `Risk`, `Asset`, or `Opportunity`, and `id` a record of that kind in the Account (a Requirement by its record id). `selectionRationale` says why it was selected. A target already linked answers 409. Answers 201 with the linked target.",
        "operationId": "events.add-target",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventTargetAdd"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventTargetAdd"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventTargetAdd"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEventTarget"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/events/{id}/targets/{type}/{targetId}": {
      "delete": {
        "tags": [
          "Events"
        ],
        "summary": "Unlink a target from an Event",
        "description": "Removes a target from the Event, as the Details page's Remove does. `type` is the target's kind, such as `Risk`. The linked record itself is untouched, and a target whose record was deleted can still be unlinked. A target that is not linked answers 404.",
        "operationId": "events.remove-target",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/evidence": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "summary": "List Evidence",
        "description": "Lists the Account's Evidence library with OData query options over stored fields (camelCase): `$filter` (e.g. `expiresAt lt 2027-01-01`), `$select` (e.g. `title,originalFilename,byteSize`), `$orderby` (e.g. `uploadedAt desc`), `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`. The records each item is attached to come from the single get. `nextOffset` is the `$skip` for the next page, or null on the last one.",
        "operationId": "evidence.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Evidence"
        ],
        "summary": "File an upload as Evidence",
        "description": "Files a finished upload with target `evidence` (at most 50 MiB) as a new Evidence item, as the Evidence upload page does. `title` is required. The content type comes from the upload's file name. `attachTo` attaches it to a Task at once; Evidence takes no other kind, and another kind answers 422 on `attachTo.type`. An upload that is unknown, unfinished, already used, for another target, or another User's answers 422 on `uploadId`. Answers 201 with the new Evidence.",
        "operationId": "evidence.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEvidenceCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEvidenceCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEvidenceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEvidence"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/evidence/{id}": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "summary": "Get Evidence",
        "description": "Returns the Evidence item as its Details page shows it: title, description, collected and expiry dates, the stored file name, content type, size, and SHA-256, and the Tasks it is attached to. `fileUrl` downloads the bytes.",
        "operationId": "evidence.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEvidence"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Evidence"
        ],
        "summary": "Change Evidence metadata",
        "description": "Changes the fields you send and keeps the rest, as the Evidence Edit page does: `title`, `description`, `collectedAt`, `expiresAt`. `null` clears `description` and the dates; `title` cannot be blank. The file itself never changes; upload a new Evidence item for a new file.",
        "operationId": "evidence.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEvidenceUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEvidenceUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEvidenceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEvidence"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Evidence"
        ],
        "summary": "Delete Evidence",
        "description": "Permanently deletes the Evidence item, its links, and its stored file, as the Evidence Details page's Delete does. The Tasks it was attached to stay.",
        "operationId": "evidence.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/evidence/{id}/links": {
      "post": {
        "tags": [
          "Evidence"
        ],
        "summary": "Attach Evidence to a Task",
        "description": "Attaches the Evidence to a record, as the Attach button on a Task does: `{ type, id }`. Evidence is attached only to a Task; another kind answers 422 on `type`, and a Task that does not exist answers 422 on `id`. Attaching twice changes nothing. Open, Done, and Cancelled Tasks all take Evidence. Answers with the Evidence.",
        "operationId": "evidence.link",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFileTargetInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFileTargetInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFileTargetInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEvidence"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/evidence/{id}/links/{type}/{targetId}": {
      "delete": {
        "tags": [
          "Evidence"
        ],
        "summary": "Detach Evidence from a record",
        "description": "Removes one link, as the Detach button on the Evidence Details page and on a Task does. `type` is the record's kind (`Task`). The Evidence and its other links stay. Evidence that is not attached to that record answers 404.",
        "operationId": "evidence.detach",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/evidence/{id}/file": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "summary": "Download an Evidence file",
        "description": "Streams the file a person uploaded, with its stored content type, and its stored file name in `Content-Disposition`.",
        "operationId": "evidence.download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "$ref": "#/components/schemas/Stream"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/findings": {
      "get": {
        "tags": [
          "Findings"
        ],
        "summary": "List Findings",
        "description": "Lists the Finding register with OData query options over stored fields (camelCase): `$filter` (e.g. `severity eq 'Major' and sourceType eq 'Event'`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Major`, `AdHoc`). `nextOffset` is the `$skip` for the next page, or null on the last one. The workflow state is derived from the chain tasks, so it comes from the single get.",
        "operationId": "findings.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Findings"
        ],
        "summary": "Raise a Finding",
        "description": "Raises a Finding (numbered FND-###) and opens the first task of its chain, owned and assigned to you: Root cause for `Major` and `Minor`, Improvement action for `Opportunity`. `severity` is `Major`, `Minor` (the default), or `Opportunity`. `title` is required. `sourceType` defaults to `AdHoc`, which takes no `sourceId`; `Event` and `Incident` need the `sourceId` of a record in the Account. Severity can be changed later through `PATCH /api/v1/findings/{id}`; the source is fixed once raised. `raisedAt` defaults to today and may not be in the future. `externalLink` is an optional absolute `http` or `https` URL of at most 2048 characters to the matching item in your tracker. Answers 201 with the new Finding.",
        "operationId": "findings.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFindingCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFindingCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFindingCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFinding"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/findings/{id}": {
      "get": {
        "tags": [
          "Findings"
        ],
        "summary": "Get a Finding",
        "description": "Returns the whole Finding with what its Details page shows: the workflow state derived from its corrective-action chain (`Open`, `RootCauseInProgress`, `ActionInProgress`, `AwaitingEffectivenessCheck`, `Closed`, `Rejected`) and whether it is finished, the Event or Incident it was raised from, the chain step it waits on, every chain task with its written result (oldest first), and its `externalLink`. A chain step is done by completing its Task.",
        "operationId": "findings.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFinding"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Findings"
        ],
        "summary": "Change a Finding",
        "description": "Changes the fields you send and keeps the rest; `null` clears `descriptionHtml`, `dueAt`, or `externalLink`. `raisedAt` may not be in the future. `externalLink` is an absolute `http` or `https` URL of at most 2048 characters. `severity` is `Major`, `Minor`, or `Opportunity`: changing it on a live Finding across the Opportunity line cancels the open chain step and opens the first step of the other chain (Root cause, or Improvement action), and the answer carries the resulting `workflowState`; on a `Closed` or `Rejected` Finding it only relabels. `sourceType` and `sourceId` are fixed at creation: sending a different value answers 422. Otherwise the workflow does not change here: complete the chain step's Task, or call `POST /api/v1/findings/{id}/reject` or `/reopen`; a `workflowState` other than the current one answers 422.",
        "operationId": "findings.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFindingUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFindingUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFindingUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFinding"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Findings"
        ],
        "summary": "Delete a Finding",
        "description": "Permanently deletes a Finding raised in error, and cancels its open chain task. A Finding that needs no corrective action is rejected instead (`POST /api/v1/findings/{id}/reject`), which keeps its record. A Finding still referenced elsewhere answers 409.",
        "operationId": "findings.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/events/{eventId}/findings": {
      "post": {
        "tags": [
          "Events"
        ],
        "summary": "Raise a Finding from an Event",
        "description": "Raises a Finding whose source is this Event, as the Event's New Finding page does, and opens the first task of its chain, owned and assigned to you. `title` is required; `severity` is `Major`, `Minor` (the default), or `Opportunity`, and can be changed later through `PATCH /api/v1/findings/{id}`. `raisedAt` defaults to today and may not be in the future; `externalLink` is optional, as on `POST /api/v1/findings`. Answers 201 with the new Finding, which `GET /api/v1/findings/{id}` returns from then on.",
        "operationId": "events.create-finding",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventFindingCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventFindingCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventFindingCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFinding"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/findings/{id}/reject": {
      "post": {
        "tags": [
          "Findings"
        ],
        "summary": "Reject a Finding",
        "description": "Stops a Finding that needs no corrective action: cancels its open chain step, if it still has one, and records `reasonHtml` (required) as a Rejection, so its workflow state becomes `Rejected`. Works from any chain step, on any severity. `rejectedAt` backdates the Rejection, such as to a date in an older system; it may not be in the future or before the Finding was raised. A Finding already `Closed` or `Rejected` answers 409, and so does a Finding with no step Task at all.",
        "operationId": "findings.reject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiFindingRejectRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiFindingRejectRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiFindingRejectRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFinding"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/findings/{id}/reopen": {
      "post": {
        "tags": [
          "Findings"
        ],
        "summary": "Reopen a Finding",
        "description": "Reopens a `Rejected` Finding at the chain step the Rejection interrupted, owned as that step was. Any other workflow state answers 409; a `Closed` Finding reopens only when its effectiveness check is completed as not effective.",
        "operationId": "findings.reopen",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFinding"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/findings/{id}/comments": {
      "get": {
        "tags": [
          "Findings"
        ],
        "summary": "List a Finding's Comments",
        "description": "Every Comment on the Finding, oldest first: whole-Finding Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "findings.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Findings"
        ],
        "summary": "Comment on a Finding",
        "description": "Adds a Comment as you. Without `phrase` it is on the Finding as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on a Finding, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "findings.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/findings/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Findings"
        ],
        "summary": "Edit a Comment on a Finding",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Finding Comment cannot become a Phrase Comment.",
        "operationId": "findings.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Findings"
        ],
        "summary": "Delete a Comment on a Finding",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "findings.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks": {
      "get": {
        "tags": [
          "Frameworks"
        ],
        "summary": "List the Framework Catalog",
        "description": "Lists every Framework in the Catalog, as the Frameworks page does: adopted Frameworks first, then by name. Each carries its catalog `id` (the key in every Framework path, such as `iso-27001-2022`), its `frameworkLine` (the priced line its edition belongs to), its `edition` year, its `kind` (`Standard` or `Regulation`), whether the Account has `adopted` it, its `price` (the yearly list price of its line: `amount` excluding VAT, `currency`, `interval`, and `includedUsd`, the Assistant funds the line includes; null for a Sub-framework, which follows its parent, and for a line the catalog does not price) and `lineHeld` (true when the Account already holds that Framework line, so adopting a Framework whose `lineHeld` is true adds nothing to the bill, which the Frameworks page shows as Included), and for a Sub-framework its `parentFrameworkId` and `country` (both null for every other Framework; the list is flat, so a parent such as `nis2` and its Sub-frameworks are all in it). The Catalog is not paged.",
        "operationId": "frameworks.list",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiFramework"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}": {
      "get": {
        "tags": [
          "Frameworks"
        ],
        "summary": "Get a Framework",
        "description": "Returns the Framework with what its page shows: its `parentFrameworkId` and `country` when it is a Sub-framework (null otherwise), whether the Account adopted it and, once adopted, the five-state `gap` counts over its Requirements (Excluded, Undecided, Unaddressed, PartiallyAddressed, Addressed, and the `gaps` still needing attention) and `proposedCoverageCount`, the live Crosswalk proposals into it from the Account's other adopted Frameworks. An unknown `frameworkId` answers 404.",
        "operationId": "frameworks.get",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFrameworkDetails"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/adopt": {
      "post": {
        "tags": [
          "Frameworks"
        ],
        "summary": "Adopt a Framework",
        "description": "Adopts the Framework for the Account, as the Frameworks page's Adopt does: a record and a Requirement Review for every mandatory Requirement, and the Framework's three system-made Schedules. A Framework whose paid Framework line the Account does not pay for yet adopts nothing: it answers a Browser handoff whose `handoffUrl` opens Auth's Add License line page with the line and the Framework filled in, where an Owner confirms the charge; the adoption then completes in the browser. On a Trial or complimentary License, or a line already paid for, it adopts at once and answers the Framework; `hasProposals` true means live Crosswalk proposals now wait at `…/proposed-coverage`. An already adopted Framework answers 409. A parent such as `nis2` also adopts the Sub-framework of every country in Countries, and answers 409 naming Countries while none is set; a Sub-framework follows its parent and Countries, so adopting one answers 409.",
        "operationId": "frameworks.adopt",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFrameworkDetails"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/unadopt": {
      "post": {
        "tags": [
          "Frameworks"
        ],
        "summary": "Unadopt a Framework",
        "description": "Unadopts the Framework, as the Frameworks page does, and cannot be undone: the Account's Requirement records for it go, with their decisions and narratives, and so does every Schedule pinned to it, system-made and member-made, with its open Next occurrence task; their Events stay, as One-offs. The Framework's Framework statement goes too, and its public address then answers 404. When it was the last adopted edition of a paid Framework line, that line drops at the end of the billing period (no refund); lowering spending needs no browser. A Framework that is not adopted answers 409. A parent such as `nis2` unadopts its Sub-frameworks first; a Sub-framework follows its parent and Countries, so unadopting one answers 409.",
        "operationId": "frameworks.unadopt",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFrameworkDetails"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/start-gap-analysis": {
      "post": {
        "tags": [
          "Gap analysis"
        ],
        "summary": "Start a gap analysis",
        "description": "Starts the Framework's gap analysis, as the Framework page's Start gap analysis does: a shared conversation in which our Assistant walks the Account through the Framework's Requirements. There is at most one live gap analysis per Framework, so when one is running this answers that one; send `startOver: true` to close it and start a fresh one (the page's Start over). Follow the work with `GET /api/v1/conversations/{id}/messages?after=0&wait=60`, and answer the Assistant there. Starting a fresh one spends the Assistant allowance: an empty allowance answers 402 `allowance-exhausted`. A Framework the Account has not adopted answers 409.",
        "operationId": "frameworks.start-gap-analysis",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiGapAnalysisStart"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiGapAnalysisStart"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiGapAnalysisStart"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiConversation"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "402": {
            "description": "`allowance-exhausted`: The Assistant allowance is empty.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "allowance-exhausted"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/proposed-coverage": {
      "get": {
        "tags": [
          "Proposed coverage"
        ],
        "summary": "List a Framework's Proposed coverage",
        "description": "The live Crosswalk proposals into an adopted Framework, as its Proposed coverage page shows them: each names a record (`artifact`) that covers a Requirement of another adopted Framework and, through a shared Hub topic, should also cover `requirementCode` here. `strength` is the strongest of its `paths` and only informs; accepting any proposal writes the same ordinary coverage. Proposals are composed live, never stored: an accepted one drops off, and an Excluded Requirement gets none. Not paged.",
        "operationId": "frameworks.list-proposed-coverage",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiCoverageProposal"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/proposed-coverage/accept": {
      "post": {
        "tags": [
          "Proposed coverage"
        ],
        "summary": "Accept one Proposed coverage",
        "description": "Accepts one live proposal, as the page's Accept does: links `proposal.artifactId` (of `proposal.artifactType`) as coverage of `proposal.requirementCode` in this Framework. Name it with the `requirementCode`, `artifact.type`, and `artifact.id` the list returned; a proposal that is not live now answers 422. Answers the proposals still live.",
        "operationId": "frameworks.accept-proposed-coverage",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCoverageProposalAccept"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCoverageProposalAccept"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCoverageProposalAccept"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiCoverageProposal"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/proposed-coverage/accept-many": {
      "post": {
        "tags": [
          "Proposed coverage"
        ],
        "summary": "Accept several Proposed coverage",
        "description": "Accepts several live proposals at once, as the page's Accept selected does: each of `proposals` is named as for a single accept. Every proposal must be live, or the call answers 422 (`errors` keyed `proposals[i]`) and accepts none. Answers the proposals still live.",
        "operationId": "frameworks.accept-many-proposed-coverage",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCoverageProposalAcceptMany"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCoverageProposalAcceptMany"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCoverageProposalAcceptMany"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiCoverageProposal"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/statement": {
      "post": {
        "tags": [
          "Framework statement"
        ],
        "summary": "Issue a Framework statement",
        "description": "Issues the Framework's Framework statement, as the Overview's Issue and Issue again do: a frozen, dated account of the Account's position on the Framework (and on its adopted Sub-frameworks), signed in the name of the User the call acts for, written in the Account's Content language, and readable by anyone at `url` without signing in. Issuing again replaces the statement at the same address and keeps its `slug`. A Sub-framework has no statement of its own and answers 409; a Framework the Account has not adopted answers 404.",
        "operationId": "frameworks.issue-statement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFrameworkStatement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "get": {
        "tags": [
          "Framework statement"
        ],
        "summary": "Get a Framework statement",
        "description": "Returns the Framework's Framework statement: its `slug`, its public `url`, the `language` it is written in, when it was issued (`issuedOn` is the issuer's Local day, `issuedAt` the moment), the `signer`, and the frozen `content`: the Scope and every Requirement with its state, status, narrative or justification, and the names of the records that cover it. 404 when the Framework is not adopted or has no statement; 409 for a Sub-framework.",
        "operationId": "frameworks.get-statement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFrameworkStatement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Framework statement"
        ],
        "summary": "Change a Framework statement's slug",
        "description": "Moves the statement to a new address, as the Edit link page does: `slug` is the last part of the public address, 3-50 lowercase letters, numbers, and hyphens, not starting or ending with a hyphen. The old address then answers Not found. A badly formed or already taken slug answers 422. 404 when the Framework is not adopted or has no statement; 409 for a Sub-framework.",
        "operationId": "frameworks.update-statement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFrameworkStatementUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFrameworkStatementUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFrameworkStatementUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFrameworkStatement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Framework statement"
        ],
        "summary": "Delete a Framework statement",
        "description": "Deletes the Framework's statement, as the Overview's Delete does. Its public address then answers Not found. Unadopting the Framework deletes it too. 404 when the Framework is not adopted or has no statement; 409 for a Sub-framework.",
        "operationId": "frameworks.delete-statement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/statement/pdf": {
      "get": {
        "tags": [
          "Framework statement"
        ],
        "summary": "Download a Framework statement",
        "description": "Returns the Framework statement as a PDF with the same content as the public page, as an attachment named `{slug}.pdf`. 404 when the Framework is not adopted or has no statement; 409 for a Sub-framework.",
        "operationId": "frameworks.download-statement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Stream"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/import-sessions": {
      "get": {
        "tags": [
          "Import sessions"
        ],
        "summary": "List Import sessions",
        "description": "Lists the Account's Import sessions, newest first, as the Import list shows them: file, status, the list `label`, progress, and which controls the session offers now. `pages` is null here; get one session for its pages. Page with `$top` (default 50, at most 200) and `$skip`; `nextOffset` is the `$skip` for the next page, or null on the last one.",
        "operationId": "import-sessions.list",
        "parameters": [
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiImportSession"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Import sessions"
        ],
        "summary": "Start an Import",
        "description": "Creates an Import session from a finished upload with target `import` (a Confluence space export `.zip`), as the Import upload page does, and starts preparing it: the prepare reads the export's page tree. Answers 201 with the session, `Pending`; poll it until `Prepared`, then start a run. An upload that is unknown, unfinished, already used, for another target, or another User's answers 422 on `uploadId`, as does an export that is not a non-empty `.zip`.",
        "operationId": "import-sessions.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiImportSessionCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiImportSessionCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiImportSessionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiImportSession"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/import-sessions/{id}": {
      "get": {
        "tags": [
          "Import sessions"
        ],
        "summary": "Get an Import session",
        "description": "Returns the Import session with its status and progress, and, once prepared, its Import pages with their processing status, marks, and the records each created: what the Import control page shows. Poll it while the session is `Pending`, `Preparing`, or `Processing`.",
        "operationId": "import-sessions.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiImportSession"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Import sessions"
        ],
        "summary": "Delete an Import session",
        "description": "Deletes a settled session and its working data (its pages, the stored export, and staged attachments), as the Import list's Delete does. Records the Import already created stay. A running session answers 409; so does a delete that stopped partway, which you can send again to finish.",
        "operationId": "import-sessions.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/import-sessions/{id}/start": {
      "post": {
        "tags": [
          "Import sessions"
        ],
        "summary": "Start an Import run",
        "description": "Starts a run on a `Prepared` session, as the Import control page's buttons do: `mode` `full` interprets every page still Pending, `marked` the marked pages (a Completed one runs again), and `continue` goes on from the first Failed page. A run spends the Assistant allowance; an empty allowance answers 402 and the session stays Prepared. A session that is not Prepared, or `continue` with no Failed page, answers 409. Answers with the session, now `Processing`.",
        "operationId": "import-sessions.start",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiImportSessionStart"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiImportSessionStart"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiImportSessionStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiImportSession"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "402": {
            "description": "`allowance-exhausted`: The Assistant allowance is empty.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "allowance-exhausted"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/import-sessions/{id}/retry": {
      "post": {
        "tags": [
          "Import sessions"
        ],
        "summary": "Retry a failed prepare",
        "description": "Retries a session whose prepare failed (`PrepareFailed`), as the Import control and Status pages' Retry does. With no Import pages yet, it prepares the export again (`Pending`); with pages already listed, it keeps them and moves the session back to `Prepared`. Any other status answers 409.",
        "operationId": "import-sessions.retry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiImportSession"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/import-sessions/{id}/pages/{pageId}/mark": {
      "post": {
        "tags": [
          "Import sessions"
        ],
        "summary": "Mark an Import page",
        "description": "Marks (`marked: true`) or unmarks one Import page for a `marked` run, as the Import control page's Mark checkbox does. `pageId` is the page's `id` in the session. Only a `Prepared` session takes marks; any other status answers 409.",
        "operationId": "import-sessions.mark-page",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiImportPageMark"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiImportPageMark"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiImportPageMark"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiImportSession"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/incidents": {
      "get": {
        "tags": [
          "Incidents"
        ],
        "summary": "List Incidents",
        "description": "Lists the Incident register with OData query options over stored fields (camelCase): `$filter` (e.g. `state eq 'Open' and severity eq 'Critical'`, `isPersonalDataBreach eq true`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Open`, `Closed`). `nextOffset` is the `$skip` for the next page, or null on the last one. The allowed actions come from the single get.",
        "operationId": "incidents.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Record an Incident",
        "description": "Records a security Incident (numbered INC-###) in state `Open`; to record one that is already over, close it afterwards. `title` is required. `descriptionHtml` defaults to the Account's Incident description Default content. `severity` defaults to `Medium` and `detectedAt` to now. A personal-data breach (`isPersonalDataBreach` true) needs `breachConfirmedAt`, the moment awareness was established, which may not fall before `detectedAt`. `reportedToAuthorityAt`, when the breach was reported to the supervisory authority, is allowed only on a personal-data breach, may not fall before `breachConfirmedAt` and may not be in the future. A Cbw significant incident (`isSignificantIncident` true) needs `significantIncidentAwareAt`, when the Account learned it is significant, which may not fall before `detectedAt`. `earlyWarningSentAt`, `notificationSentAt`, `progressReportSentAt` and `finalReportSentAt` are allowed only on a significant incident, may not fall before `significantIncidentAwareAt`, and may not be on a day after today. `externalLink` is an optional absolute `http` or `https` URL of at most 2048 characters to the matching item in your tracker. Answers 201 with the new Incident.",
        "operationId": "incidents.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiIncidentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiIncidentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiIncidentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIncident"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/incidents/{id}": {
      "get": {
        "tags": [
          "Incidents"
        ],
        "summary": "Get an Incident",
        "description": "Returns the whole Incident with what its Details page shows: its state (`Open` or `Closed`) and when it was last closed (`closedAt`), the breach notification deadline (awareness plus 72 hours) while a personal-data breach is Open and not yet reported to the authority (`reportedToAuthorityAt`), the Cbw significant-incident fields with the next unmet Cbw report (`cbwReportDue`: `earlyWarning`, `notification` or `finalReport`) and its `cbwReportDeadline`, which are null on an Account without NIS2 Netherlands (Cbw, 2026), the Lifecycle action its state allows now (`allowedActions`: `close` or `reopen`), whether Attachments can be added, and its `externalLink`.",
        "operationId": "incidents.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIncident"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Incidents"
        ],
        "summary": "Change an Incident",
        "description": "Changes the fields you send and keeps the rest; `null` clears `descriptionHtml`, `breachConfirmedAt`, `reportedToAuthorityAt`, `significantIncidentAwareAt`, `earlyWarningSentAt`, `notificationSentAt`, `progressReportSentAt`, `finalReportSentAt`, or `externalLink`; setting `isPersonalDataBreach` to false clears `reportedToAuthorityAt` too, and setting `isSignificantIncident` to false clears the four Cbw report dates and keeps `significantIncidentAwareAt`. `externalLink` is an absolute `http` or `https` URL of at most 2048 characters. `state` never changes here: a different state answers 422 naming `POST /api/v1/incidents/{id}/close` or `/reopen`. Every change checks that `breachConfirmedAt` is not before `detectedAt`, and that `reportedToAuthorityAt` is on a personal-data breach, not before `breachConfirmedAt` and not in the future; it checks that a significant incident has `significantIncidentAwareAt` not before `detectedAt`, and that each Cbw report date is on a significant incident, not before `significantIncidentAwareAt` and not on a day after today. It answers 422 otherwise.",
        "operationId": "incidents.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiIncidentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiIncidentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiIncidentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIncident"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Incidents"
        ],
        "summary": "Delete an Incident",
        "description": "Permanently deletes an Incident logged in error. To record that a real Incident is over, close it instead. An Incident still referenced elsewhere (for example by a Finding) answers 409.",
        "operationId": "incidents.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/incidents/{id}/close": {
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Close an Incident",
        "description": "Moves an `Open` Incident to `Closed`. Closing checks nothing and records `closedAt`. A `Closed` Incident answers 409.",
        "operationId": "incidents.close",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIncident"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/incidents/{id}/reopen": {
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Reopen an Incident",
        "description": "Returns a `Closed` Incident to `Open` and clears `closedAt`. An `Open` Incident answers 409.",
        "operationId": "incidents.reopen",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIncident"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/incidents/{id}/comments": {
      "get": {
        "tags": [
          "Incidents"
        ],
        "summary": "List an Incident's Comments",
        "description": "Every Comment on the Incident, oldest first: whole-Incident Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "incidents.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Comment on an Incident",
        "description": "Adds a Comment as you. Without `phrase` it is on the Incident as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); an Incident takes Phrase Comments on `descriptionHtml`, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "incidents.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/incidents/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Incidents"
        ],
        "summary": "Edit a Comment on an Incident",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Incident Comment cannot become a Phrase Comment.",
        "operationId": "incidents.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Incidents"
        ],
        "summary": "Delete a Comment on an Incident",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "incidents.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/comments": {
      "get": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "List an Interested Party's Comments",
        "description": "Every Comment on the Interested Party, oldest first: whole-party Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "interested-parties.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Comment on an Interested Party",
        "description": "Adds a Comment as you. Without `phrase` it is on the party as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on an Interested Party, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "interested-parties.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Edit a Comment on an Interested Party",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-party Comment cannot become a Phrase Comment.",
        "operationId": "interested-parties.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Delete a Comment on an Interested Party",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "interested-parties.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties": {
      "get": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "List Interested Parties",
        "description": "Lists the Interested Party register (the customers, regulators, employees, and others whose needs shape the organisation's context) with OData query options over stored fields (camelCase): `$filter` (e.g. `status eq 'Active' and kind eq 'Regulator'`, `contains(name, 'bank')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Active`, `CertificationBody`). `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (review, responses, Party Requirements) come from the single get.",
        "operationId": "interested-parties.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Create an Interested Party",
        "description": "Records an Interested Party (numbered IPY-###) and enrols it in Interested Party Review; you are recorded as its first reviewer. `name` is required. `kind` defaults to `Customer` and `status` to `Active`; a party that no longer applies can be created `Archived`. Send `reviewOptOutReason` to opt it out of review from the start. Answers 201 with the new Interested Party.",
        "operationId": "interested-parties.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInterestedPartyCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInterestedPartyCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInterestedPartyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}": {
      "get": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Get an Interested Party",
        "description": "Returns the whole Interested Party with what its Details page shows: the next Interested Party Review due and the review opt-out state and history, the Requirements it covers, its responses (the Risks, Opportunities, Policies, Objectives, and Kpis raised because of it), and its Party Requirements (what it requires of the organisation).",
        "operationId": "interested-parties.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Change an Interested Party",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `descriptionHtml`. A real change counts as an Interested Party Review by you. `status` cannot change here: a change answers 422 naming the action to call instead (`POST /api/v1/interested-parties/{id}/archive` or `/reactivate`).",
        "operationId": "interested-parties.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInterestedPartyUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInterestedPartyUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInterestedPartyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Delete an Interested Party",
        "description": "Permanently deletes an Interested Party recorded in error, with its open review, its Party Requirements, its covered Requirements, and its response links (the responses themselves stay). To record that a real party no longer applies, Archive it instead. A party still referenced elsewhere answers 409.",
        "operationId": "interested-parties.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/archive": {
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Archive an Interested Party",
        "description": "Records that the party no longer applies: status `Archived`, and its Interested Party Review paused (the open review task is cancelled). An archived party answers 409.",
        "operationId": "interested-parties.archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/reactivate": {
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Reactivate an Interested Party",
        "description": "Returns an archived party to `Active` and resumes its Interested Party Review, or enrols it when it never had one (unless it is opted out, or the Account's Interested Party Review Cadence is none); you become the owner of a new review. An active party answers 409.",
        "operationId": "interested-parties.reactivate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/opt-out": {
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Opt an Interested Party out of Interested Party Review",
        "description": "Stops the party's Interested Party Review: cancels the open review task and records your `reason` (required) in the opt-out history. An archived party's review has already stopped, so it answers 409. Resume with `POST /api/v1/interested-parties/{id}/resume-review`.",
        "operationId": "interested-parties.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/resume-review": {
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Resume an Interested Party's Interested Party Review",
        "description": "Ends the party's review opt-out. When the Account's Interested Party Review Cadence is an interval, the next review is due that interval from today; under none it only clears the opt-out. A party that is not opted out, or is archived, answers 409.",
        "operationId": "interested-parties.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/link-requirements": {
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Set the Requirements an Interested Party covers",
        "description": "Replaces the Framework Requirements the party covers with `requirements` (each `frameworkId` and `code`, e.g. `iso-27001-2022` and `4.2`); `[]` clears them. An added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. A link the party already has may stay. The party's own requirements are under `/party-requirements`.",
        "operationId": "interested-parties.link-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/link-responses": {
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Set an Interested Party's responses",
        "description": "Replaces the Risks, Opportunities, Policies, Objectives, and Kpis raised because of the party with `responses` (each `type` and `id`); `[]` clears them. Each response must name an existing record of that type, or the call answers 422 and changes nothing. The response's own Details page shows the party under Arises from.",
        "operationId": "interested-parties.link-responses",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkResponsesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkResponsesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkResponsesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/remove-response": {
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Remove one of an Interested Party's responses",
        "description": "Unlinks one response (`type` and `id`) from the party; the response itself stays. A record that is not one of the party's responses answers 404.",
        "operationId": "interested-parties.remove-response",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiResponseKey"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiResponseKey"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiResponseKey"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInterestedParty"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/party-requirements": {
      "get": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "List an Interested Party's Party Requirements",
        "description": "What the party requires of the organisation (a contract clause, a regulation, an expectation), each with its `requirementHtml`, optional `source`, and whether it `isMandatory`. These are the party's own requirements, not the Framework Requirements that `link-requirements` sets.",
        "operationId": "interested-parties.list-party-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiPartyRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Add a Party Requirement",
        "description": "Records one requirement the party imposes on the organisation. `requirementHtml` is required; `source` names where it comes from; `isMandatory` defaults to true. Answers 201 with the new Party Requirement.",
        "operationId": "interested-parties.add-party-requirement",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPartyRequirementCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPartyRequirementCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPartyRequirementCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPartyRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/interested-parties/{id}/party-requirements/{requirementId}": {
      "patch": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Change a Party Requirement",
        "description": "Changes the fields you send and keeps the rest; `null` clears `source`. A Party Requirement of another party answers 404.",
        "operationId": "interested-parties.update-party-requirement",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "requirementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPartyRequirementUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPartyRequirementUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPartyRequirementUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPartyRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Interested Parties"
        ],
        "summary": "Delete a Party Requirement",
        "description": "Removes a Party Requirement that has lapsed. A Party Requirement of another party answers 404.",
        "operationId": "interested-parties.delete-party-requirement",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "requirementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/invitations/preview": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "Preview People Invitations",
        "description": "Shows what `POST /api/v1/invitations` would do for `personIds`, as the People page's confirm step does, and sends nothing: who is eligible and the email their Invitation would go to, and who would be skipped and why (`External`, `Departed`, `NoIdentity`, `AlreadyAccountUser`, `PendingInvitation`, `NotFound`). Only an Owner of the Account may invite; a Member gets 403.",
        "operationId": "invitations.preview",
        "parameters": [
          {
            "name": "personIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInvitationPreview"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/invitations": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Send People Invitations",
        "description": "Sends one Invitation per eligible Person in `personIds` to their primary email (or first identity); accepting it makes them a Member of this Account. Eligible People are not External, have an identity, have not departed, are not yet Account Users, and have no pending Invitation on that email. Each Person is sent on their own: a skip or a failed send does not stop the others, and the answer lists who was invited and who was skipped and why. Only an Owner of the Account may invite; a Member gets 403.",
        "operationId": "invitations.send",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInvitationSendRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInvitationSendRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInvitationSendRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInvitationResult"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/kpis": {
      "get": {
        "tags": [
          "Kpis"
        ],
        "summary": "List Kpis",
        "description": "Lists the Kpi register (the recurring measurements that show how the management system performs) with OData query options over stored fields (camelCase): `$filter` (e.g. `archivedAt eq null`, `contains(title, 'patch')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (measurement dates, measured Objectives) come from the single get.",
        "operationId": "kpis.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Kpis"
        ],
        "summary": "Create a Kpi",
        "description": "Records a Kpi (numbered KPI-###) and enrols it in measurement on the Account's Kpi measurement Cadence; each measurement task asks for Evidence holding the measured value. `title` is required. Omit `ownerKind` to own it yourself as a Person; send `null` for no Owner. Send `archivedAt` to record a Kpi already retired from monitoring (its measurement is paused at once), or `measurementOptOutReason` to opt it out of measurement from the start. Answers 201 with the new Kpi.",
        "operationId": "kpis.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKpiCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKpiCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKpiCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKpi"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/kpis/{id}": {
      "get": {
        "tags": [
          "Kpis"
        ],
        "summary": "Get a Kpi",
        "description": "Returns the whole Kpi with what its Details page shows: the measurement state (last measured, next measurement due, and the measurement opt-out and its history), the Objectives it measures, the Requirements it covers, and the Business Issues and Interested Parties it arises from. The measured values themselves live in the Evidence filed on each measurement task.",
        "operationId": "kpis.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKpi"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Kpis"
        ],
        "summary": "Change a Kpi",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `descriptionHtml` or the Owner. A new Owner also becomes the default assignee of later measurement tasks. Archiving has its own actions (`POST /api/v1/kpis/{id}/archive` and `/unarchive`); a changed `archivedAt` answers 422, and the measured Objectives are set on the Objective (`kpiIds`).",
        "operationId": "kpis.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKpiUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKpiUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKpiUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKpi"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Kpis"
        ],
        "summary": "Delete a Kpi",
        "description": "Permanently deletes a Kpi recorded in error, with its measurement cadence and open measurement task. To stop measuring a real Kpi, Archive it instead. A Kpi still referenced elsewhere answers 409.",
        "operationId": "kpis.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/kpis/{id}/archive": {
      "post": {
        "tags": [
          "Kpis"
        ],
        "summary": "Archive a Kpi",
        "description": "Retires the Kpi from monitoring: archived now, and its measurement stopped (the open measurement task is cancelled). Its history stays. An archived Kpi answers 409.",
        "operationId": "kpis.archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKpi"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/kpis/{id}/unarchive": {
      "post": {
        "tags": [
          "Kpis"
        ],
        "summary": "Unarchive a Kpi",
        "description": "Returns an archived Kpi to monitoring and restarts its measurement (unless it is opted out): a new measurement task is due one Cadence interval out. A Kpi that is not archived answers 409.",
        "operationId": "kpis.unarchive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKpi"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/kpis/{id}/comments": {
      "get": {
        "tags": [
          "Kpis"
        ],
        "summary": "List a Kpi's Comments",
        "description": "Every Comment on the Kpi, oldest first: whole-Kpi Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "kpis.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Kpis"
        ],
        "summary": "Comment on a Kpi",
        "description": "Adds a Comment as you. Without `phrase` it is on the Kpi as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on a Kpi, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "kpis.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/kpis/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Kpis"
        ],
        "summary": "Edit a Comment on a Kpi",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Kpi Comment cannot become a Phrase Comment.",
        "operationId": "kpis.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Kpis"
        ],
        "summary": "Delete a Comment on a Kpi",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "kpis.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/kpis/{id}/opt-out": {
      "post": {
        "tags": [
          "Kpis"
        ],
        "summary": "Opt a Kpi out of measurement",
        "description": "A Kpi's Cadence act is its measurement, so this pauses measurement (there is no Kpi review): it cancels the open measurement task and records your `reason` (required) in the opt-out history. The Kpi stays live. An archived Kpi is not measured, so it answers 409. Resume with `POST /api/v1/kpis/{id}/resume-review`.",
        "operationId": "kpis.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKpi"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/kpis/{id}/resume-review": {
      "post": {
        "tags": [
          "Kpis"
        ],
        "summary": "Resume a Kpi's measurement",
        "description": "Ends the Kpi's measurement opt-out (the shared `resume-review` shape; for a Kpi it resumes measurement). When the Account's Kpi measurement Cadence is an interval, the next measurement is due that interval from today; under none it only clears the opt-out. A Kpi that is not opted out, or is archived, answers 409.",
        "operationId": "kpis.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKpi"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/kpis/{id}/link-requirements": {
      "post": {
        "tags": [
          "Kpis"
        ],
        "summary": "Set the Requirements a Kpi covers",
        "description": "Replaces the Kpi's covered Requirements with `requirements` (each `frameworkId` and `code`, e.g. `iso-27001-2022` and `9.1`); `[]` clears them. An added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. A link the Kpi already has may stay.",
        "operationId": "kpis.link-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKpi"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/legal-acceptance": {
      "post": {
        "tags": [
          "Legal Acceptance"
        ],
        "summary": "Hand Legal Acceptance off to the browser",
        "description": "Legal Acceptance is a person's act, so this always answers 403 `browser-handoff`: show the person `handoffUrl`, where they accept the terms in the browser. Until they do, every call except the Account list and switch answers the same handoff.",
        "operationId": "legal-acceptance.accept",
        "responses": {
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/license/framework-lines": {
      "post": {
        "tags": [
          "License"
        ],
        "summary": "Hand adding a paid Framework line off to the browser",
        "description": "Adding a Framework line charges money, so this answers 403 `browser-handoff`: show the Owner `handoffUrl`, Auth's Add License line page with the line filled in, where they see the prorated amount and confirm the charge. `frameworkLine` is a line key such as `iso-9001` (see `frameworkLine` on `GET /api/v1/frameworks`). A line that needs no charge (the License is not paid, or the line is already paid for) answers 409: adopt a Framework of that line instead. An unknown line answers 422. Owner only; a Member gets 403 `forbidden`.",
        "operationId": "license.add-framework-line",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFrameworkLineAdd"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFrameworkLineAdd"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFrameworkLineAdd"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/license/framework-lines/{frameworkLine}": {
      "delete": {
        "tags": [
          "License"
        ],
        "summary": "Drop a Framework line",
        "description": "Unadopts every adopted edition of the Framework line (such as both ISO 14001 editions for `iso-14001`, or NIS2 with its country Sub-frameworks for `nis2`), as the Frameworks page's Unadopt does for each, and cannot be undone: their Requirement records go, and so does every Schedule pinned to them, system-made and member-made; their Events stay, as One-offs. On a paid License the line then drops at the end of the billing period (no refund); lowering spending needs no browser. To drop one edition only, use `POST /api/v1/frameworks/{frameworkId}/unadopt`. An unknown line answers 404; a line with no adopted edition answers 409. Answers the License. Owner only; a Member gets 403 `forbidden`.",
        "operationId": "license.drop-framework-line",
        "parameters": [
          {
            "name": "frameworkLine",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiLicense"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/license/subscribe": {
      "post": {
        "tags": [
          "License"
        ],
        "summary": "Hand subscribing off to the browser",
        "description": "Subscribing charges money, so this answers 403 `browser-handoff`: show the Owner `handoffUrl`, Auth's Subscriptions page, where they press Subscribe for Compliance and pay in Stripe Checkout. A License that is not a Trial, or a subscription that already grants access, answers 409. Owner only; a Member gets 403 `forbidden`.",
        "operationId": "license.subscribe",
        "responses": {
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/license/cancel": {
      "post": {
        "tags": [
          "License"
        ],
        "summary": "Cancel the License",
        "description": "Cancels the Compliance License's subscription as the Subscriptions page's Cancel does: it ends at the end of the current billing period, with no refund, and access continues until then. Lowering spending needs no browser. Answers the `outcome`: `cancelled`, `alreadyEnding` (it was already set to end; nothing changed), or `noSubscription` (no subscription grants access, as on a Trial; nothing changed), with `accessUntil` when known. Owner only; a Member gets 403 `forbidden`.",
        "operationId": "license.cancel",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiLicenseCancellation"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/notifications": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List your Notifications",
        "description": "Your Notifications, newest first, as the Notifications page lists them: one per Comment that Mentioned you or was left on a record you take part in. `readAt` is null while unread. `record` names the record the Comment is on, and `url` opens the page at that Comment.",
        "operationId": "notifications.list",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiNotification"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/notifications/mark-all-read": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Mark all your Notifications read",
        "description": "Marks every one of your unread Notifications read, as the page's Mark all read does, and answers the list.",
        "operationId": "notifications.mark-all-read",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiNotification"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/notifications/mark-read": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Mark one Notification read",
        "description": "Marks your Notification for the Comment `commentId` (required) read, as opening that Comment on its page does, and answers the list. An unknown Comment answers 404; a Comment you have no Notification for changes nothing.",
        "operationId": "notifications.mark-read",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiNotificationMarkRead"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiNotificationMarkRead"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiNotificationMarkRead"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiNotification"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/objectives": {
      "get": {
        "tags": [
          "Objectives"
        ],
        "summary": "List Objectives",
        "description": "Lists the Objective register (the planned information-security objectives) with OData query options over stored fields (camelCase): `$filter` (e.g. `status eq 'Active'`, `targetDate lt 2027-01-01`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Active`, `Achieved`). `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (review dates, Kpis, Opportunities) come from the single get.",
        "operationId": "objectives.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Objectives"
        ],
        "summary": "Create an Objective",
        "description": "Records an `Active` Objective (numbered OBJ-###) and enrols it in Objective Review on the Account's Cadence; you are recorded as its first reviewer. `title` is required. Omit `ownerKind` to own it yourself as a Person; send `null` for no Owner. Send `reviewOptOutReason` to opt it out of review from the start. Link the Kpis that measure it afterwards with `PATCH` `kpiIds`. Answers 201 with the new Objective.",
        "operationId": "objectives.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiObjectiveCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiObjectiveCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiObjectiveCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiObjective"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/objectives/{id}": {
      "get": {
        "tags": [
          "Objectives"
        ],
        "summary": "Get an Objective",
        "description": "Returns the whole Objective with what its Details page shows: the review state (last reviewed, next review due, and the review opt-out and its history), the Kpis that measure it, the Opportunities that name it, the Requirements it covers, and the Business Issues and Interested Parties it arises from.",
        "operationId": "objectives.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiObjective"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Objectives"
        ],
        "summary": "Change an Objective",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `descriptionHtml`, `planHtml`, `targetDate`, or the Owner. `kpiIds` replaces the Kpis that measure the Objective (`null` or `[]` clears them); each must be a Kpi of the Account. A real change to the title, description, plan, or target date counts as an Objective Review by you. `status` cannot change here: only completing the Objective's review task sets it, so a change answers 422. The Opportunities are linked from the Opportunity (`objectiveIds`).",
        "operationId": "objectives.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiObjectiveUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiObjectiveUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiObjectiveUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiObjective"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Objectives"
        ],
        "summary": "Delete an Objective",
        "description": "Permanently deletes an Objective recorded in error, with its review cadence, its open review task, and its Kpi and Opportunity links (the Kpis and Opportunities themselves stay). An Objective still referenced elsewhere answers 409.",
        "operationId": "objectives.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/objectives/{id}/comments": {
      "get": {
        "tags": [
          "Objectives"
        ],
        "summary": "List an Objective's Comments",
        "description": "Every Comment on the Objective, oldest first: whole-Objective Comments (`phrase` null) and Phrase Comments on its description or plan (`phrase.field` = `descriptionHtml` or `planHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "objectives.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Objectives"
        ],
        "summary": "Comment on an Objective",
        "description": "Adds a Comment as you. Without `phrase` it is on the Objective as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); `descriptionHtml` and `planHtml` take Phrase Comments on an Objective, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "objectives.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/objectives/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Objectives"
        ],
        "summary": "Edit a Comment on an Objective",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Objective Comment cannot become a Phrase Comment.",
        "operationId": "objectives.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Objectives"
        ],
        "summary": "Delete a Comment on an Objective",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "objectives.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/objectives/{id}/opt-out": {
      "post": {
        "tags": [
          "Objectives"
        ],
        "summary": "Opt an Objective out of Objective Review",
        "description": "Stops the Objective's review: cancels the open review task and records your `reason` (required) in the opt-out history. An `Achieved` or `Abandoned` Objective is no longer reviewed, so it answers 409. Resume with `POST /api/v1/objectives/{id}/resume-review`.",
        "operationId": "objectives.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiObjective"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/objectives/{id}/resume-review": {
      "post": {
        "tags": [
          "Objectives"
        ],
        "summary": "Resume an Objective's Objective Review",
        "description": "Ends the Objective's review opt-out. When the Account's Objective Review Cadence is an interval, the next review is due that interval from today; under none it only clears the opt-out. An Objective that is not opted out, or is `Achieved` or `Abandoned`, answers 409.",
        "operationId": "objectives.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiObjective"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/objectives/{id}/link-requirements": {
      "post": {
        "tags": [
          "Objectives"
        ],
        "summary": "Set the Requirements an Objective covers",
        "description": "Replaces the Objective's covered Requirements with `requirements` (each `frameworkId` and `code`, e.g. `iso-27001-2022` and `6.2`); `[]` clears them. An added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. A link the Objective already has may stay.",
        "operationId": "objectives.link-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiObjective"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/opportunities/{id}/comments": {
      "get": {
        "tags": [
          "Opportunities"
        ],
        "summary": "List an Opportunity's Comments",
        "description": "Every Comment on the Opportunity, oldest first: whole-Opportunity Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "opportunities.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Comment on an Opportunity",
        "description": "Adds a Comment as you. Without `phrase` it is on the Opportunity as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on an Opportunity, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "opportunities.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/opportunities/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Edit a Comment on an Opportunity",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Opportunity Comment cannot become a Phrase Comment.",
        "operationId": "opportunities.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Delete a Comment on an Opportunity",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "opportunities.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/opportunities": {
      "get": {
        "tags": [
          "Opportunities"
        ],
        "summary": "List Opportunities",
        "description": "Lists the Opportunity register (uncertain events that would help the organisation if they occurred) with OData query options over stored fields (camelCase): `$filter` (e.g. `status eq 'Active'`, `contains(title, 'automation')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Active`, `Archived`). `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (review, Objectives) come from the single get.",
        "operationId": "opportunities.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Create an Opportunity",
        "description": "Records an Opportunity (numbered OPP-###) and enrols it in Opportunity Review; you are recorded as its first reviewer and as the default reviewer. `title` and `descriptionHtml` are required. Without `ownerKind` it has no Owner, as on the page. `status` defaults to `Active` and `identifiedAt` to today. An Opportunity that has already passed can be created `Archived`, with `archivedAt`. Send `reviewOptOutReason` to opt it out of review from the start. Link Objectives afterwards with `PATCH` `objectiveIds`. Answers 201 with the new Opportunity.",
        "operationId": "opportunities.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOpportunityCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOpportunityCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOpportunityCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOpportunity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/opportunities/{id}": {
      "get": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Get an Opportunity",
        "description": "Returns the whole Opportunity with what its Details page shows: the next Opportunity Review due and the review opt-out state and history, the Objectives it names, the Requirements it covers, and the Business Issues and Interested Parties it arises from.",
        "operationId": "opportunities.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOpportunity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Change an Opportunity",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `category` or the Owner. `objectiveIds` replaces the Objectives the Opportunity names (`null` or `[]` clears them); each must be an Objective of the Account. `status` cannot change here: a change answers 422 naming the action to call instead (`POST /api/v1/opportunities/{id}/archive` or `/reactivate`). `archivedAt` only corrects the date of an archived Opportunity.",
        "operationId": "opportunities.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOpportunityUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOpportunityUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOpportunityUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOpportunity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Delete an Opportunity",
        "description": "Permanently deletes an Opportunity recorded in error, with its open review, its covered Requirements, and its Objective links (the Objectives themselves stay). To record that a real Opportunity no longer applies, Archive it instead. An Opportunity still referenced elsewhere answers 409.",
        "operationId": "opportunities.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/opportunities/{id}/archive": {
      "post": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Archive an Opportunity",
        "description": "Records that the Opportunity no longer applies: status `Archived`, archived today, and its Opportunity Review paused (the open review task is cancelled). An archived Opportunity answers 409.",
        "operationId": "opportunities.archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOpportunity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/opportunities/{id}/reactivate": {
      "post": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Reactivate an Opportunity",
        "description": "Returns an archived Opportunity to `Active`, clearing its archiving date, and resumes its Opportunity Review (unless it is opted out). An active Opportunity answers 409.",
        "operationId": "opportunities.reactivate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOpportunity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/opportunities/{id}/opt-out": {
      "post": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Opt an Opportunity out of Opportunity Review",
        "description": "Stops the Opportunity's review: cancels the open review task and records your `reason` (required) in the opt-out history. An archived Opportunity's review has already stopped, so it answers 409. Resume with `POST /api/v1/opportunities/{id}/resume-review`.",
        "operationId": "opportunities.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOpportunity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/opportunities/{id}/resume-review": {
      "post": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Resume an Opportunity's Opportunity Review",
        "description": "Ends the Opportunity's review opt-out. When the Account's Opportunity Review Cadence is an interval, the next review is due that interval from today, assigned to you; under none it only clears the opt-out. An Opportunity that is not opted out, or is archived, answers 409.",
        "operationId": "opportunities.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOpportunity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/opportunities/{id}/link-requirements": {
      "post": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Set the Requirements an Opportunity covers",
        "description": "Replaces the Opportunity's covered Requirements with `requirements` (each `frameworkId` and `code`, e.g. `iso-27001-2022` and `6.1.1`); `[]` clears them. An added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. A link the Opportunity already has may stay.",
        "operationId": "opportunities.link-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOpportunity"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/organisation-profile": {
      "get": {
        "tags": [
          "Organisation profile"
        ],
        "summary": "Get the Organisation Profile",
        "description": "Returns the Account's Organisation Profile: the prose about what the organisation does (business, size, locations, systems and data, third parties, regulatory exposure) that grounds every Assistant turn. Before the first save, `id` is null and `bodyHtml` is empty.",
        "operationId": "organisation-profile.get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrganisationProfile"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Organisation profile"
        ],
        "summary": "Replace the Organisation Profile",
        "description": "Replaces the whole profile with `bodyHtml` (required; rich text, sanitized) as you, as the Grounding tab's Save does. A profile longer than `maxCharacters` plain-text characters answers 422 on `bodyHtml` and changes nothing.",
        "operationId": "organisation-profile.update",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrganisationProfileUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrganisationProfileUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrganisationProfileUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrganisationProfile"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/organisation-profile/comments": {
      "get": {
        "tags": [
          "Organisation profile"
        ],
        "summary": "List the Organisation Profile's Comments",
        "description": "Every Comment on the Organisation Profile, oldest first. The profile takes whole-profile Comments only. Before the first save there is no profile to comment on, so this answers 404.",
        "operationId": "organisation-profile.list-comments",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Organisation profile"
        ],
        "summary": "Comment on the Organisation Profile",
        "description": "Adds a whole-profile Comment as you (rich text; a `phrase` answers 422). Notifies anyone Mentioned.",
        "operationId": "organisation-profile.add-comment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/organisation-profile/comments/{commentId}": {
      "patch": {
        "tags": [
          "Organisation profile"
        ],
        "summary": "Edit a Comment on the Organisation Profile",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment.",
        "operationId": "organisation-profile.update-comment",
        "parameters": [
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Organisation profile"
        ],
        "summary": "Delete a Comment on the Organisation Profile",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "organisation-profile.delete-comment",
        "parameters": [
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people/{id}/comments": {
      "get": {
        "tags": [
          "People"
        ],
        "summary": "List a Person's Comments",
        "description": "Every Comment on the Person, oldest first: whole-Person Comments (`phrase` null) and Phrase Comments on their notes (`phrase.field` = `notesHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "people.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Comment on a Person",
        "description": "Adds a Comment as you. Without `phrase` it is on the Person as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `notesHtml` takes Phrase Comments on a Person, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "people.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "People"
        ],
        "summary": "Edit a Comment on a Person",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Person Comment cannot become a Phrase Comment.",
        "operationId": "people.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "People"
        ],
        "summary": "Delete a Comment on a Person",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "people.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people": {
      "get": {
        "tags": [
          "People"
        ],
        "summary": "List People",
        "description": "Lists the People register (everyone the ISMS names: employees, contractors, board members, and External people such as auditors) with OData query options over stored fields (camelCase): `$filter` (e.g. `status eq 'Active' and affiliation eq 'Contractor'`, `contains(fullName, 'Jan')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Active`, `OnLeave`, `Employee`). `nextOffset` is the `$skip` for the next page, or null on the last one. Identities, Roles, and open tasks come from the single get.",
        "operationId": "people.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Create a Person",
        "description": "Records a Person (numbered PER-###). `fullName` is required. `email` becomes their primary identity and is matched to a User of this Account with that email; it may be omitted. `affiliation` defaults to `Employee` and `status` to `Active`. `startedAt` defaults to today. Someone who already left can be created `Departed`, with `endedAt`; nothing is handed over then (use `POST /api/v1/people/{id}/depart` for someone leaving now). `roleIds` sets the Roles the new Person holds and re-evaluates the Approval and Awareness audiences of documents naming those Roles; an id that is not a Role of this Account answers 422. An email already on another Person answers 422 naming them. Answers 201 with the new Person.",
        "operationId": "people.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPerson"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people/{id}": {
      "get": {
        "tags": [
          "People"
        ],
        "summary": "Get a Person",
        "description": "Returns the whole Person with what their Details page shows: their login identities (which email is primary, and which User each signs in as), their manager, the Roles they hold, their open tasks (tasks linked to them and tasks they own or are assigned, such as training), whether they have departed, and `access`: what the Person can reach, the same as the Permissions tab of their Details page (`Member` with the pages they reach, the access on each and the Roles that give it; `AccountOwner` and `NoLogin` with no pages).",
        "operationId": "people.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPerson"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "People"
        ],
        "summary": "Change a Person",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `jobTitle`, `department`, `managerPersonId`, `startedAt`, or `notesHtml`. `status` moves between `Pending`, `Active`, and `OnLeave`: a change into or out of `Departed` answers 422 naming the action to call instead (`POST /api/v1/people/{id}/depart` or `/reactivate`). `endedAt` only corrects the departure date of a Departed Person. `roleIds` replaces the Roles the Person holds and re-evaluates the Approval and Awareness audiences of documents naming those Roles. When that would leave a Role with no holders while it still owns or is assigned work, the call answers 409 naming those Roles (`vacantRoles`) and changes nothing; send the same body with `confirmVacancy: true` to go ahead.",
        "operationId": "people.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPerson"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "People"
        ],
        "summary": "Delete a Person",
        "description": "Permanently deletes a Person recorded in error. To record that someone left, depart them instead (`POST /api/v1/people/{id}/depart`). A Person still referenced elsewhere (an owner, an assignee, a recorded act) answers 409.",
        "operationId": "people.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people/{id}/identities": {
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Add a login identity to a Person",
        "description": "Adds `email` as one more login identity of the Person, matched to a User of this Account with that email, or to `linkedUserId` when you send it. The first identity of a Person with none becomes primary. An email the Person already has changes nothing; an email or User already on another Person answers 422 naming them. Answers the Person.",
        "operationId": "people.add-identity",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonIdentityCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonIdentityCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonIdentityCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPerson"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people/{id}/identities/{identityId}": {
      "delete": {
        "tags": [
          "People"
        ],
        "summary": "Remove a login identity from a Person",
        "description": "Removes one identity. Removing the primary one makes another remaining identity primary. An identity whose User has already created, completed, or commented on a task answers 409, so the recorded work keeps its author.",
        "operationId": "people.remove-identity",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "identityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people/{id}/identities/{identityId}/set-primary": {
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Make an identity a Person's primary one",
        "description": "Makes this identity the Person's primary one, whose email is their display email. An identity of another Person answers 404. Answers the Person.",
        "operationId": "people.set-primary-identity",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "identityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPerson"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people/{id}/depart": {
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Record that a Person left",
        "description": "Records the departure as the Depart page does: status `Departed` on `endedAt` (default today; may lie in the future), their open attestation and training tasks cancelled, and the Assets they own Returned to owner on that day. `ownedAssetIdsToReturn` names which owned Assets go back; omit it to return all of them, or send `[]` to return none. With `successorPersonId`, everything they are responsible for (ownership, assignments, Role memberships, the Approval audiences naming them) moves to that Person, who must be Internal and not departed themselves (else 422 on `successorPersonId`); omit it to hand over nothing. A departed Person answers 409.",
        "operationId": "people.depart",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiPersonDepartRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiPersonDepartRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiPersonDepartRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPerson"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people/{id}/reactivate": {
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Bring a departed Person back",
        "description": "Returns a departed Person to `Active`, clearing their departure date, and mints the attestation tasks they are not covered for. What a Successor took over stays with the Successor. A Person who has not departed answers 409.",
        "operationId": "people.reactivate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPerson"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/people/{id}/merge": {
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Merge a Person into another",
        "description": "Folds this Person (a duplicate) into `intoPersonId`, as the Merge page does: their identities, work, ownership, Role memberships, Comments, and notifications move onto the surviving Person, and this Person is deleted. The survivor keeps their own status, dates, and notes. `fullName`, `affiliation`, `jobTitle`, `department`, and `managerPersonId` default to this Person's values (for `jobTitle`, `department`, and `managerPersonId` only when set), and `primaryIdentityId` to the survivor's own primary identity; send any of them to choose otherwise. Answers the surviving Person.",
        "operationId": "people.merge",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonMergeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonMergeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPersonMergeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPerson"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/policies/{id}/comments": {
      "get": {
        "tags": [
          "Policies"
        ],
        "summary": "List a Policy's Comments",
        "description": "Every Comment on the Policy, oldest first: whole-Policy Comments (`phrase` null) and Phrase Comments on its body (`phrase.field` = `bodyHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "policies.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Policies"
        ],
        "summary": "Comment on a Policy",
        "description": "Adds a Comment as you. Without `phrase` it is on the Policy as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `bodyHtml` takes Phrase Comments on a Policy, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies the Owner and anyone Mentioned.",
        "operationId": "policies.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/policies/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Policies"
        ],
        "summary": "Edit a Comment on a Policy",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Policy Comment cannot become a Phrase Comment.",
        "operationId": "policies.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Policies"
        ],
        "summary": "Delete a Comment on a Policy",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "policies.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/policies": {
      "get": {
        "tags": [
          "Policies"
        ],
        "summary": "List Policies",
        "description": "Lists the Policy register with OData query options over stored fields (camelCase): `$filter` (e.g. `archivedAt eq null`, `contains(title, 'access')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (review, Approval and Awareness) come from the single get.",
        "operationId": "policies.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Policies"
        ],
        "summary": "Create a Policy",
        "description": "Writes a live Policy (numbered POL-###) and enrols it in Policy Review; you are recorded as its first reviewer. `title` and `bodyHtml` are required. Omit `ownerKind` to own it yourself as a Person. Omit both approval audience lists to ask the Owner to Approve, or name Persons (`approvalAudiencePersonIds`) or Roles (`approvalAudienceRoleIds`), never both; `[]` asks nobody. `awarenessAudienceKind` defaults to `Everyone`; `TheseRoles` needs `awarenessAudienceRoleIds`. Approval and Awareness tasks open at once. Answers 201 with the new Policy.",
        "operationId": "policies.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPolicyCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPolicyCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPolicyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPolicy"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/policies/{id}": {
      "get": {
        "tags": [
          "Policies"
        ],
        "summary": "Get a Policy",
        "description": "Returns the whole Policy with what its Details page shows: the review state (last reviewed, next due, `lag`), the review opt-out and its history, the recent completed reviews, the Approval and Awareness audiences, and while it is live who is covered for the current words and who still has an open Approval or Awareness task. It also names the Requirements it covers, the Business Issues and Interested Parties it arises from, and the Procedures that implement it.",
        "operationId": "policies.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPolicy"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Policies"
        ],
        "summary": "Change a Policy",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does. A real change to `title` or `bodyHtml` is a word change: it counts as a Policy Review by you (outside a 24-hour window) and asks Approval and Awareness of the new words; an Owner-only change does neither. The approval audience lists replace the named Persons or Roles, never both; sending one list non-empty clears the other, and `null` clears a list. `awarenessAudienceKind` (`Everyone` or `TheseRoles`) with `awarenessAudienceRoleIds` replaces the Awareness audience. `procedureIds` replaces the Procedures that implement the Policy; `null` or `[]` clears them. A change to `archivedAt` answers 422 naming the action to call instead (`POST /api/v1/policies/{id}/archive` or `/unarchive`).",
        "operationId": "policies.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPolicyUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPolicyUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPolicyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPolicy"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Policies"
        ],
        "summary": "Delete a Policy",
        "description": "Permanently deletes a Policy written in error, with its open tasks and its history. To retire a real document, Archive it instead. A Policy still referenced elsewhere answers 409.",
        "operationId": "policies.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/policies/{id}/archive": {
      "post": {
        "tags": [
          "Policies"
        ],
        "summary": "Archive a Policy",
        "description": "Retires the Policy: it stays readable and editable, its Policy Review is paused, and its open Approval and Awareness tasks are cancelled (done ones stay). An archived Policy answers 409.",
        "operationId": "policies.archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPolicy"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/policies/{id}/unarchive": {
      "post": {
        "tags": [
          "Policies"
        ],
        "summary": "Unarchive a Policy",
        "description": "Brings an archived Policy back: Policy Review resumes (unless it is opted out, or the Account's Policy Review Cadence is none), and Approval and Awareness are asked again of everyone not already covered for the current words. A live Policy answers 409.",
        "operationId": "policies.unarchive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPolicy"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/policies/{id}/opt-out": {
      "post": {
        "tags": [
          "Policies"
        ],
        "summary": "Opt a Policy out of Policy Review",
        "description": "Stops the Policy's Policy Review: cancels the open review task and records your `reason` (required) in the opt-out history. An archived Policy's review has already stopped, so it answers 409. Resume with `POST /api/v1/policies/{id}/resume-review`.",
        "operationId": "policies.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPolicy"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/policies/{id}/resume-review": {
      "post": {
        "tags": [
          "Policies"
        ],
        "summary": "Resume a Policy's Policy Review",
        "description": "Ends the Policy's review opt-out. When the Account's Policy Review Cadence is an interval, the next review is due that interval from today; under none it only clears the opt-out. A Policy that is not opted out, or is archived, answers 409.",
        "operationId": "policies.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPolicy"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/policies/{id}/link-requirements": {
      "post": {
        "tags": [
          "Policies"
        ],
        "summary": "Set the Requirements a Policy covers",
        "description": "Replaces the Policy's covered Requirements with `requirements` (each `frameworkId` and `code`, e.g. `iso-27001-2022` and `A.5.1`); `[]` clears them. An added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. A link the Policy already has may stay.",
        "operationId": "policies.link-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPolicy"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/procedures/{id}/comments": {
      "get": {
        "tags": [
          "Procedures"
        ],
        "summary": "List a Procedure's Comments",
        "description": "Every Comment on the Procedure, oldest first: whole-Procedure Comments (`phrase` null) and Phrase Comments on its body (`phrase.field` = `bodyHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "procedures.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Procedures"
        ],
        "summary": "Comment on a Procedure",
        "description": "Adds a Comment as you. Without `phrase` it is on the Procedure as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `bodyHtml` takes Phrase Comments on a Procedure, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies the Owner and anyone Mentioned.",
        "operationId": "procedures.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/procedures/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Procedures"
        ],
        "summary": "Edit a Comment on a Procedure",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Procedure Comment cannot become a Phrase Comment.",
        "operationId": "procedures.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Procedures"
        ],
        "summary": "Delete a Comment on a Procedure",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "procedures.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/procedures": {
      "get": {
        "tags": [
          "Procedures"
        ],
        "summary": "List Procedures",
        "description": "Lists the Procedure register with OData query options over stored fields (camelCase): `$filter` (e.g. `archivedAt eq null`, `contains(title, 'backup')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (review, Awareness) come from the single get.",
        "operationId": "procedures.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Procedures"
        ],
        "summary": "Create a Procedure",
        "description": "Writes a live Procedure (numbered PRO-###) and enrols it in Procedure Review; you are recorded as its first reviewer. `title` and `bodyHtml` are required. Omit `ownerKind` to own it yourself as a Person. `awarenessAudienceKind` defaults to `Everyone`; `TheseRoles` needs `awarenessAudienceRoleIds`. Awareness tasks open at once. Answers 201 with the new Procedure.",
        "operationId": "procedures.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProcedureCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProcedureCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProcedureCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProcedure"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/procedures/{id}": {
      "get": {
        "tags": [
          "Procedures"
        ],
        "summary": "Get a Procedure",
        "description": "Returns the whole Procedure with what its Details page shows: the review state (last reviewed, next due, `lag`), the review opt-out and its history, the recent completed reviews, the Awareness audience, and while it is live who is covered for the current words and who still has an open Awareness task. It also names the Requirements it covers and the Policies it implements.",
        "operationId": "procedures.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProcedure"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Procedures"
        ],
        "summary": "Change a Procedure",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does. A real change to `title` or `bodyHtml` is a word change: it counts as a Procedure Review by you (outside a 24-hour window) and asks Awareness of the new words; an Owner-only change does neither. `awarenessAudienceKind` (`Everyone` or `TheseRoles`) with `awarenessAudienceRoleIds` replaces the Awareness audience. `policyIds` replaces the Policies the Procedure implements; `null` or `[]` clears them. A change to `archivedAt` answers 422 naming the action to call instead (`POST /api/v1/procedures/{id}/archive` or `/unarchive`).",
        "operationId": "procedures.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProcedureUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProcedureUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProcedureUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProcedure"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Procedures"
        ],
        "summary": "Delete a Procedure",
        "description": "Permanently deletes a Procedure written in error, with its open tasks and its history. To retire a real document, Archive it instead. A Procedure still referenced elsewhere answers 409.",
        "operationId": "procedures.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/procedures/{id}/archive": {
      "post": {
        "tags": [
          "Procedures"
        ],
        "summary": "Archive a Procedure",
        "description": "Retires the Procedure: it stays readable and editable, its Procedure Review is paused, and its open Awareness tasks are cancelled (done ones stay). An archived Procedure answers 409.",
        "operationId": "procedures.archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProcedure"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/procedures/{id}/unarchive": {
      "post": {
        "tags": [
          "Procedures"
        ],
        "summary": "Unarchive a Procedure",
        "description": "Brings an archived Procedure back: Procedure Review resumes (unless it is opted out, or the Account's Procedure Review Cadence is none), and Awareness is asked again of everyone not already covered for the current words. A live Procedure answers 409.",
        "operationId": "procedures.unarchive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProcedure"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/procedures/{id}/opt-out": {
      "post": {
        "tags": [
          "Procedures"
        ],
        "summary": "Opt a Procedure out of Procedure Review",
        "description": "Stops the Procedure's Procedure Review: cancels the open review task and records your `reason` (required) in the opt-out history. An archived Procedure's review has already stopped, so it answers 409. Resume with `POST /api/v1/procedures/{id}/resume-review`.",
        "operationId": "procedures.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProcedure"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/procedures/{id}/resume-review": {
      "post": {
        "tags": [
          "Procedures"
        ],
        "summary": "Resume a Procedure's Procedure Review",
        "description": "Ends the Procedure's review opt-out. When the Account's Procedure Review Cadence is an interval, the next review is due that interval from today; under none it only clears the opt-out. A Procedure that is not opted out, or is archived, answers 409.",
        "operationId": "procedures.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProcedure"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/procedures/{id}/link-requirements": {
      "post": {
        "tags": [
          "Procedures"
        ],
        "summary": "Set the Requirements a Procedure covers",
        "description": "Replaces the Procedure's covered Requirements with `requirements` (each `frameworkId` and `code`, e.g. `iso-27001-2022` and `A.5.1`); `[]` clears them. An added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. A link the Procedure already has may stay.",
        "operationId": "procedures.link-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProcedure"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/requirements/{code}/comments": {
      "get": {
        "tags": [
          "Requirements"
        ],
        "summary": "List a Requirement's Comments",
        "description": "Every Comment on the Requirement, oldest first: whole-Requirement Comments (`phrase` null) and Phrase Comments on its narrative (`phrase.field` = `narrativeHtml`). `bodyHtml` is the body as stored, `bodyText` the same as plain text. Comments hang off the Account's record, so a Requirement not yet reviewed answers 409.",
        "operationId": "frameworks.list-requirement-comments",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Requirements"
        ],
        "summary": "Comment on a Requirement",
        "description": "Adds a Comment as you. Without `phrase` it is on the Requirement as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters of the narrative (`narrativeHtml`, the only field that takes one; the catalog text does not). Notifies anyone Mentioned. A Requirement not yet reviewed answers 409.",
        "operationId": "frameworks.add-requirement-comment",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/requirements/{code}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Requirements"
        ],
        "summary": "Edit a Comment on a Requirement",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters of the narrative; a whole-Requirement Comment cannot become a Phrase Comment.",
        "operationId": "frameworks.update-requirement-comment",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Requirements"
        ],
        "summary": "Delete a Comment on a Requirement",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "frameworks.delete-requirement-comment",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/requirements": {
      "get": {
        "tags": [
          "Requirements"
        ],
        "summary": "List a Framework's Requirements",
        "description": "Every catalog Requirement of an adopted Framework, in catalog order, as the Requirements page shows them: the catalog `code`, `title`, `category`, and `isMandatory`, the Account's decision (`applicable`: true, false for Excluded, null while not yet reviewed; `exclusionJustification`; the Owner; `status`), and the derived `gapState`. A Requirement not yet reviewed has no record, so its `id` is null; the `code` is the key in every Requirement path. Catalog Requirements are not stored rows, so this list takes only `$top` (default 50, at most 200) and `$skip`; another OData option answers 422. `nextOffset` is the `$skip` for the next page, or null on the last one.",
        "operationId": "frameworks.list-requirements",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiRequirementRow"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/requirements/{code}": {
      "get": {
        "tags": [
          "Requirements"
        ],
        "summary": "Get a Requirement",
        "description": "Returns the whole Requirement with what its Details page shows: the catalog text (`body`), `isMandatory`, the Account's decision and implementation (`applicable`, `exclusionJustification`, Owner, `status`, `narrativeHtml`), the derived `gapState`, the `review` (last reviewed, next review due, the opt-out and its history, and the recent completed reviews), and the `coverage`: every Policy, Procedure, Risk, Objective, Kpi, Business Issue, Interested Party, Opportunity, and Training Course that covers it, and the Scope when it does. A Requirement not yet reviewed has `id` null and no review; its coverage still shows.",
        "operationId": "frameworks.get-requirement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Requirements"
        ],
        "summary": "Change a Requirement's implementation",
        "description": "Changes the fields you send and keeps the rest, as the Requirement Edit page does, on an applicable Requirement: the Owner (`ownerKind` `Person` or `Role` with `ownerId`; an applicable Requirement always has one), `status` (`Planned`, `Implemented`, or `Operating`; applicability is not a status, use `…/applicability`), and `narrativeHtml` (`null` clears it). A real change to the status or narrative counts as a Requirement Review by you. A Requirement not yet reviewed, or Excluded, answers 409.",
        "operationId": "frameworks.update-requirement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRequirementUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRequirementUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRequirementUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/requirements/{code}/applicability": {
      "patch": {
        "tags": [
          "Requirements"
        ],
        "summary": "Mark a Requirement applicable or excluded",
        "description": "The Requirement Details page's Mark applicable and Mark excluded. `applicable: true` marks it applicable: it gets an Owner (you, when it has none), status `Planned`, and Requirement Review on the Account's Cadence, without a review being recorded; on an applicable Requirement it changes nothing. `applicable: false` excludes it with `justification` (required): the Owner is cleared and its review is held. A Requirement not yet reviewed gets its record here. A mandatory Requirement always applies, so it answers 422.",
        "operationId": "frameworks.set-requirement-applicability",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRequirementApplicability"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRequirementApplicability"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRequirementApplicability"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/requirements/{code}/reset": {
      "post": {
        "tags": [
          "Requirements"
        ],
        "summary": "Reset a Requirement to not yet reviewed",
        "description": "The Requirement Details page's Reset: deletes the Account's record of the Requirement, so its decision, justification, Owner, status, and narrative all go at once and it is \"Not yet reviewed\" again. Its coverage stays. A Requirement not yet reviewed stays as it is. A mandatory Requirement always has a record, so it answers 422.",
        "operationId": "frameworks.reset-requirement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/requirements/{code}/materialise": {
      "post": {
        "tags": [
          "Requirements"
        ],
        "summary": "Materialise a Requirement",
        "description": "What opening a not-yet-reviewed Requirement from the Requirements page does: gives it an applicable record (status `Planned`, owned by you) and enrols it in Requirement Review on the Account's Cadence. Answers 201 with the Requirement. A Requirement that already has a record answers 200 with it, unchanged. A mandatory Requirement without a record answers 422 (mandatory records are made at adoption).",
        "operationId": "frameworks.materialise-requirement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/requirements/{code}/opt-out": {
      "post": {
        "tags": [
          "Requirements"
        ],
        "summary": "Opt a Requirement out of Requirement Review",
        "description": "Stops the Requirement's review: cancels the open review task and records your `reason` (required) in the opt-out history. Only an applicable Requirement is reviewed, so one not yet reviewed or Excluded answers 409. Resume with `…/resume-review`.",
        "operationId": "frameworks.opt-out-requirement",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/frameworks/{frameworkId}/requirements/{code}/resume-review": {
      "post": {
        "tags": [
          "Requirements"
        ],
        "summary": "Resume a Requirement's Requirement Review",
        "description": "Ends the Requirement's review opt-out. When the Account's Requirement Review Cadence is an interval, the next review is due that interval from today; under none it only clears the opt-out. A Requirement that is not opted out, not yet reviewed, or Excluded answers 409.",
        "operationId": "frameworks.resume-requirement-review",
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRequirement"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/risks/{id}/comments": {
      "get": {
        "tags": [
          "Risks"
        ],
        "summary": "List a Risk's Comments",
        "description": "Every Comment on the Risk, oldest first: whole-Risk Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "risks.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Risks"
        ],
        "summary": "Comment on a Risk",
        "description": "Adds a Comment as you. Without `phrase` it is on the Risk as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on a Risk, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies the Risk's Owner and anyone Mentioned.",
        "operationId": "risks.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/risks/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Risks"
        ],
        "summary": "Edit a Comment on a Risk",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Risk Comment cannot become a Phrase Comment.",
        "operationId": "risks.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Risks"
        ],
        "summary": "Delete a Comment on a Risk",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "risks.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/risks": {
      "get": {
        "tags": [
          "Risks"
        ],
        "summary": "List Risks",
        "description": "Lists the Risk register with OData query options over stored fields (camelCase): `$filter` (e.g. `status eq 'Open' and inherentImpact ge 4`, `contains(title, 'phishing')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Open`, `Technological`). `nextOffset` is the `$skip` for the next page, or null on the last one. Sees every adopted Framework. Derived facts (review due, treatment actions) come from the single get.",
        "operationId": "risks.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Risks"
        ],
        "summary": "Create a Risk",
        "description": "Records a Risk (numbered RSK-###) and enrols it in Risk Review on the Account's cadence; a Risk created `Accepted` or `Closed` starts with Risk Review paused. `title`, `inherentLikelihood`, and `inherentImpact` (1 to 5) are required. Omit `descriptionHtml` to start from the Account's Risk description template (Asset / Threat / Measures). Omit `ownerKind` to own it yourself as a Person; send `null` for no Owner. `status` defaults to `Open`; `Mitigated` needs both residual scores, `Closed` needs `closedAt`, and `Accepted` needs `acceptedAt`. `assetIds` name the Assets the Risk is about: Assets of the Account that are not Retired. `supplierIds` name the Suppliers that carry it: Suppliers of the Account that are not Terminated. Answers 201 with the new Risk.",
        "operationId": "risks.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRiskCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRiskCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRiskCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRisk"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/risks/{id}": {
      "get": {
        "tags": [
          "Risks"
        ],
        "summary": "Get a Risk",
        "description": "Returns the whole Risk with what its Details page shows: the next Risk Review due and the review opt-out state and history, recent completed reviews, the Requirements it covers, the Business Issues and Interested Parties it arises from, the Assets it names (`assets`), the Suppliers it names (`suppliers`), its treatment actions, and whether the page asks to revisit the residual score (`showsResidualRevisitBanner`: every treatment action finished and at least one done).",
        "operationId": "risks.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRisk"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Risks"
        ],
        "summary": "Change a Risk",
        "description": "Changes the fields you send and keeps the rest; `null` clears `descriptionHtml`, `category`, the Owner, or the residual pair. `status` takes any of `Open`, `Treating`, `Mitigated`, `Accepted`, and `Closed`. Moving into `Closed` records `closedAt` and moving into `Accepted` records `acceptedAt`, each today when you omit it; moving into `Accepted` or `Closed` also pauses the Risk's Risk Review, and moving out of both resumes it; moving between them keeps it paused. Moving out of `Closed` or `Accepted` clears that date. On a Risk that stays `Closed` or `Accepted`, `closedAt` or `acceptedAt` corrects the date. Sending `closedAt` or `acceptedAt` for a status that does not carry it answers 422, as does `null` for the status that does. `Mitigated` needs both residual scores. `assetIds` replaces the whole set of Assets the Risk names (`null` or `[]` clears it), and omitting it keeps the set; an Asset of another Account, or a Retired Asset the Risk does not already name, answers 422. `supplierIds` replaces the whole set of Suppliers the Risk names (`null` or `[]` clears it), and omitting it keeps the set; a Supplier of another Account, or a Terminated Supplier the Risk does not already name, answers 422.",
        "operationId": "risks.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRiskUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRiskUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRiskUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRisk"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Risks"
        ],
        "summary": "Delete a Risk",
        "description": "Permanently deletes a Risk recorded in error, with its open review and treatment-action tasks. To record that a real Risk no longer applies, Close it instead. A Risk still referenced elsewhere (for example by a Vulnerability accepted as this risk) answers 409.",
        "operationId": "risks.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/risks/{id}/opt-out": {
      "post": {
        "tags": [
          "Risks"
        ],
        "summary": "Opt a Risk out of Risk Review",
        "description": "Stops the Risk's Risk Review: cancels the open review task and records your `reason` (required) in the opt-out history. An Accepted or Closed Risk's review has already stopped, so it answers 409. Resume with `POST /api/v1/risks/{id}/resume-review`.",
        "operationId": "risks.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRisk"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/risks/{id}/resume-review": {
      "post": {
        "tags": [
          "Risks"
        ],
        "summary": "Resume a Risk's Risk Review",
        "description": "Ends the Risk's review opt-out. When the Account reviews Risks on an interval, the next review is due that interval after the last one (or from today when never reviewed). A Risk that is not opted out, or is Accepted or Closed, answers 409.",
        "operationId": "risks.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRisk"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/risks/{id}/link-requirements": {
      "post": {
        "tags": [
          "Risks"
        ],
        "summary": "Set the Requirements a Risk covers",
        "description": "Replaces the Risk's covered Requirements with `requirements` (each `frameworkId` and `code`, e.g. `iso-27001-2022` and `A.5.1`); `[]` clears them. An added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. A link the Risk already has may stay.",
        "operationId": "risks.link-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRisk"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/risks/{id}/treatment-actions": {
      "get": {
        "tags": [
          "Risks"
        ],
        "summary": "List a Risk's treatment actions",
        "description": "The Risk's treatment actions: the Tasks that carry out its mitigation, in any state (`Open`, `InProgress`, `Done`, `Cancelled`), each with its due date, its assigned Person, and its Task page.",
        "operationId": "risks.list-treatment-actions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiTreatmentAction"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Risks"
        ],
        "summary": "Add a treatment action to a Risk",
        "description": "Creates an Open Task for mitigation work on the Risk, owned by you: `title` (required), `dueAt` (today or later), and `assigneePersonId` (the Person who does it; omit for unassigned). It counts toward the residual-score revisit once every action is finished. A Closed or Accepted Risk takes no treatment actions and answers 409.",
        "operationId": "risks.add-treatment-action",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTreatmentActionCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTreatmentActionCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTreatmentActionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTreatmentAction"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/roles": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "List Roles",
        "description": "Lists the Role register (the named responsibilities work can be given to and People can hold) with OData query options over stored fields (camelCase): `$filter` (e.g. `contains(name, 'Security')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, `url` and `permissions` (the Role's Permissions as the single get shows them, so the list is the whole Permissions matrix); without `$select` that is all it carries. `permissions` is not a stored field, so `$filter` and `$orderby` do not offer it. `nextOffset` is the `$skip` for the next page, or null on the last one. Holders and what a Role is accountable for come from the single get.",
        "operationId": "roles.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Create a Role",
        "description": "Records a Role (numbered ROL-###). `name` is required and unique within the Account; a taken name answers 422. `descriptionHtml`, `competenciesHtml` and `screeningHtml` may be left out: a Role can be created before anyone writes down what it demands. A Role has no holders until you add them (`POST /api/v1/roles/{id}/holders`). `permissions` maps page addresses (`/Risks`) to `None`, `Read` or `Edit` and may be left out; only the pages named are given, and `None` gives nothing. A page that cannot be given (`/`, `/Settings/Email`, `/Legal`), an address that is not a Dock page, or another level answers 422 and creates no Role. Answers 201 with the new Role.",
        "operationId": "roles.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRoleCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRoleCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRoleCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRole"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/roles/{id}": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Get a Role",
        "description": "Returns the whole Role with what its Details page shows: the People who hold it, and every live record it owns or is assigned (Accountable for), with the field that names the Role, and `trainingCourses`, the courses whose Training audience names the Role.",
        "operationId": "roles.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRole"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Roles"
        ],
        "summary": "Change a Role",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `descriptionHtml`, `competenciesHtml` or `screeningHtml`. A name another Role has answers 422. `permissions` changes only the pages named, each page address (`/Risks`) to `None`, `Read` or `Edit`: `None` removes the Role's Permission on that page (and changes nothing on a page the Role gives nothing on), and every page not named keeps its level; `null` answers 422. A page that cannot be given (`/`, `/Settings/Email`, `/Legal`), an address that is not a Dock page, or another level answers 422 and changes nothing, not even the other fields sent. Holders change through `POST /api/v1/roles/{id}/holders` and `DELETE /api/v1/roles/{id}/holders/{personId}`.",
        "operationId": "roles.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRoleUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRoleUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRoleUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRole"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Roles"
        ],
        "summary": "Delete a Role",
        "description": "Permanently deletes a Role created in error. A Role that is still held, or still owns or is assigned something, answers 409: remove its holders and hand its work to someone else first.",
        "operationId": "roles.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/roles/{id}/holders": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Give a Role one more holder",
        "description": "Makes `personId` a holder of the Role, and re-evaluates the Approval and Awareness audiences of every document that names the Role, so the new holder gets the tasks those audiences owe. A Person who already holds the Role changes nothing. Answers the Role.",
        "operationId": "roles.add-holder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRoleHolderCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRoleHolderCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiRoleHolderCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRole"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/roles/{id}/holders/{personId}": {
      "delete": {
        "tags": [
          "Roles"
        ],
        "summary": "Remove a holder from a Role",
        "description": "Removes `personId` from the Role's holders and re-evaluates the audiences of documents that name the Role. A Role may be left with no holders. When this Person is the last holder and the Role still owns or is assigned work, the call answers 409 naming what would be left unattended (`stillHolds`, counted per register) and changes nothing; repeat it with `?confirmVacancy=true` to go ahead. A Person who does not hold the Role answers 404.",
        "operationId": "roles.remove-holder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "personId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "confirmVacancy",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/roles/{id}/comments": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "List a Role's Comments",
        "description": "Every Comment on the Role, oldest first: whole-Role Comments (`phrase` null) and Phrase Comments on its description, competencies or screening (`phrase.field` = `descriptionHtml`, `competenciesHtml` or `screeningHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "roles.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Comment on a Role",
        "description": "Adds a Comment as you. Without `phrase` it is on the Role as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml`, `competenciesHtml` and `screeningHtml` take Phrase Comments on a Role, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "roles.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/roles/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Roles"
        ],
        "summary": "Edit a Comment on a Role",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Role Comment cannot become a Phrase Comment.",
        "operationId": "roles.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Roles"
        ],
        "summary": "Delete a Comment on a Role",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "roles.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/schedules": {
      "get": {
        "tags": [
          "Schedules"
        ],
        "summary": "List Schedules",
        "description": "Lists the Schedule register (the recurring duties to conduct an Event of one kind: the audits and management review each adopted Framework asks for, and the ones members add, such as a yearly pentest) with OData query options over stored fields (camelCase): `$filter` (e.g. `kind eq 'InternalAudit'`, `origin eq 'MemberMade'`, `frameworkId eq 'iso-27001-2022'`, `contains(title, 'restore')`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. A system-made Schedule stores no title; the single get names it by kind and Framework. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. `nextOffset` is the `$skip` for the next page, or null on the last one. The Next occurrence and counted Events come from the single get.",
        "operationId": "schedules.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Schedules"
        ],
        "summary": "Create a Schedule",
        "description": "Records a member-made Schedule (numbered SCH-###), as the New Schedule page does. `kind` and `title` are required; `descriptionHtml` is optional rich text recording what the duty covers, such as what a test must check. `frameworkId` pins it to an adopted Framework; a `GapAnalysis` Schedule needs one, and a `Meeting` may be pinned or left unpinned. A `ContinuityTest` Schedule needs `continuityPlanId` and takes no Framework; no other kind takes a Plan. `PentestCampaign` is not a Schedule kind. Kind and pin never change after create. `cadence` is `None` or a period such as `EveryYear` (the default); under a period the first occurrence is due that period from today. Omit `ownerKind` to own it yourself as a Person; a Schedule always has an Owner, who is the default assignee of its Next occurrence tasks. Answers 201 with the new Schedule.",
        "operationId": "schedules.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiScheduleCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiScheduleCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiScheduleCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSchedule"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/schedules/{id}": {
      "get": {
        "tags": [
          "Schedules"
        ],
        "summary": "Get a Schedule",
        "description": "Returns the whole Schedule with what its Details page shows: its display title and Framework name, the Next occurrence (when it is due, and the open task that a counted Event completes), and the Events counted toward it, newest first.",
        "operationId": "schedules.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSchedule"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Schedules"
        ],
        "summary": "Change a Schedule",
        "description": "Changes the title, `descriptionHtml`, Cadence, or Owner you send and keeps the rest, as the Edit page does. `descriptionHtml` can be cleared, with `null`; a blank value clears it too. `frameworkId` and `continuityPlanId` take `null` only on a Schedule that has no such pin. A system-made Schedule takes only `descriptionHtml`, `cadence`, and the Owner; its title follows its kind and Framework. `kind`, `frameworkId`, and `continuityPlanId` are fixed: a different value answers 422. A new Cadence moves the next occurrence to that period after the latest counted Event (or after the Schedule was created); `None` cancels the open Next occurrence task, and a period again opens one. A new Owner becomes the default assignee of its Next occurrence tasks, the open one included.",
        "operationId": "schedules.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiScheduleUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiScheduleUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiScheduleUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSchedule"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Schedules"
        ],
        "summary": "Delete a Schedule",
        "description": "Permanently deletes a member-made Schedule and cancels its open Next occurrence task. The Events counted toward it stay, as One-offs. A system-made Schedule answers 409: unadopting its Framework removes it.",
        "operationId": "schedules.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/scope": {
      "get": {
        "tags": [
          "Scope"
        ],
        "summary": "Get the Scope",
        "description": "Returns the Account's Scope statement with what the Scope page shows: the review state (last reviewed, next review due, whether it was edited since its last review, the review opt-out and its history, and the recent completed reviews) and the Requirements it covers. An Account that has not written its Scope yet answers 404; `PATCH /api/v1/scope` writes the first one.",
        "operationId": "scope.get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiScope"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Scope"
        ],
        "summary": "Write the Scope",
        "description": "Changes the fields you send and keeps the rest, as the Scope Edit page does. With no Scope yet, this writes the first one: an omitted `title` is \"Scope statement\", an omitted Owner is you as a Person, the body starts empty, and the Scope is enrolled in Scope Review with you as its first reviewer. A real change to the title or body counts as a Scope Review by you. `requirements` replaces the Requirements the Scope covers (`[]` clears them); an added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. `title`, the Owner, and `requirements` take no `null`; `bodyHtml: null` empties the body.",
        "operationId": "scope.update",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiScopeUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiScopeUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiScopeUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiScope"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Scope"
        ],
        "summary": "Delete the Scope",
        "description": "Deletes the Account's Scope statement with its history, its review cadence, and its Requirement coverage, back to the state before the first save. A Scope still referenced elsewhere answers 409.",
        "operationId": "scope.delete",
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/scope/opt-out": {
      "post": {
        "tags": [
          "Scope"
        ],
        "summary": "Opt the Scope out of Scope Review",
        "description": "Stops the Scope's review: cancels the open review task and records your `reason` (required) in the opt-out history. Resume with `POST /api/v1/scope/resume-review`.",
        "operationId": "scope.opt-out",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiScope"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/scope/resume-review": {
      "post": {
        "tags": [
          "Scope"
        ],
        "summary": "Resume the Scope's Scope Review",
        "description": "Ends the Scope's review opt-out. When the Account's Scope Review Cadence is an interval, the next review is due that interval from today; under none it only clears the opt-out. A Scope that is not opted out answers 409.",
        "operationId": "scope.resume-review",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiScope"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/scope/comments": {
      "get": {
        "tags": [
          "Scope"
        ],
        "summary": "List the Scope's Comments",
        "description": "Every Comment on the Scope, oldest first: whole-Scope Comments (`phrase` null) and Phrase Comments on its body (`phrase.field` = `bodyHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "scope.list-comments",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Scope"
        ],
        "summary": "Comment on the Scope",
        "description": "Adds a Comment as you. Without `phrase` it is on the Scope as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in the body (`field` = `bodyHtml`; another field answers 422). `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "scope.add-comment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/scope/comments/{commentId}": {
      "patch": {
        "tags": [
          "Scope"
        ],
        "summary": "Edit a Comment on the Scope",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the body; the field itself cannot change, and a whole-Scope Comment cannot become a Phrase Comment.",
        "operationId": "scope.update-comment",
        "parameters": [
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Scope"
        ],
        "summary": "Delete a Comment on the Scope",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "scope.delete-comment",
        "parameters": [
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/settings/check-cadence": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get the Check cadence",
        "description": "Returns how often the Checks run on their own, as the Checks page shows it: `None` (the default, no Check runs on its own) or an interval (`EveryMonth` … `EveryTwoYears`). With an interval set, each Check runs again whenever its last completed run is older than the interval; every such run spends Assistant allowance unless nothing the Check looks at has changed since its last run. Any member can read it.",
        "operationId": "settings.get-check-cadence",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCheckCadence"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Settings"
        ],
        "summary": "Change the Check cadence",
        "description": "Sets the Check cadence to `cadence` (required): `None` stops the Checks from running on their own, an interval (`EveryMonth` … `EveryTwoYears`) starts them. Owner only; a Member gets 403 `forbidden` and nothing changes. An unknown `cadence` answers 422 and changes nothing.",
        "operationId": "settings.update-check-cadence",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCheckCadenceUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCheckCadenceUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCheckCadenceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCheckCadence"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/settings/assistant": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get the Assistant settings",
        "description": "Returns what the Assistant Settings page shows: the Content language (the language the Assistant writes stored records in) with the languages it can be set to, and the Assistant allowance of the Allowance tab (included and extra funds left, whether the Assistant can spend, and the Auto-topup state). Auto-topup and Allowance packs change through `PATCH /api/v1/license/auto-topup` and `POST /api/v1/license/allowance-packs`; the Grounding tab is `/api/v1/organisation-profile`.",
        "operationId": "settings.get-assistant",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAssistantSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Settings"
        ],
        "summary": "Change the Assistant settings",
        "description": "Sets the Account's Content language to `contentLanguage` (required), as the Assistant Settings page does, and answers the Assistant settings. A language outside `supportedLanguages` answers 422.",
        "operationId": "settings.update-assistant",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContentLanguageUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContentLanguageUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContentLanguageUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAssistantSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/settings/content-language": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get the Content language",
        "description": "Returns the Account's Content language: the language the Assistant writes stored records in (a two-letter code), and the languages it can be set to. It does not change the language of your own screens or of API errors, which follow your UI language.",
        "operationId": "settings.get-content-language",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiContentLanguageSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Settings"
        ],
        "summary": "Set the Content language",
        "description": "Sets the Account's Content language to `contentLanguage` (required), as the Assistant Settings page does. A language outside `supportedLanguages` answers 422.",
        "operationId": "settings.update-content-language",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContentLanguageUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContentLanguageUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiContentLanguageUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiContentLanguageSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/settings/cadence": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get the Cadence settings",
        "description": "Returns how often each recurring act falls due across the Account, as the Cadence Settings page lists them: one row per act (`PolicyReview`, `RiskReview`, `ContinuityPlanReview`, `KpiMeasurement`, and so on) and the Supplier Review Cadence per Supplier Criticality. `cadence` is an interval (`EveryMonth` … `EveryTwoYears`) or `None`, the stored setting or else the product default. A Schedule's Cadence lives on the Schedule (`/api/v1/schedules`).",
        "operationId": "settings.get-cadence",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCadenceSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Settings"
        ],
        "summary": "Change the Cadence settings",
        "description": "Changes the acts and Criticalities you send and keeps the rest, through the Cadence Settings page's save. Each change applies to every enrolled record: `None` stops the act's open tasks across the Account until it is set to an interval again, and a new interval moves each record's next due date. An act without a row of its own (`SupplierReview`, which goes per Criticality in `supplierReview`, and `ScheduleNextOccurrence`), an unknown name, or an unknown Cadence answers 422 and changes nothing.",
        "operationId": "settings.update-cadence",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCadenceSettingsUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCadenceSettingsUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCadenceSettingsUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCadenceSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/settings/default-content": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get the Default content",
        "description": "Returns the starter text each Default content slot copies into a new record: `SupplierDescription` (a new Supplier's description), `RiskDescription` (a new Risk's description), `IncidentDescription` (a new Incident's description), `ChangeDescription` (a new Change's description), `AssetDescription{Kind}` (a new Asset's description: one slot per Asset `kind`, such as `AssetDescriptionHardware`) and `SupplierReview` (a new Supplier review). `hasAccountOverride` is false while the product default applies.",
        "operationId": "settings.get-default-content",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiDefaultContentSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Settings"
        ],
        "summary": "Change the Default content",
        "description": "Saves the Account's own text for each slot you send (`bodyHtml`, rich text, sanitized; an empty string saves an empty text) and keeps the others, as the Default content Settings page does per slot. An unknown slot or a missing `bodyHtml` answers 422 and changes nothing. Go back to the product default with `POST /api/v1/settings/default-content/{slot}/restore`.",
        "operationId": "settings.update-default-content",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiDefaultContentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiDefaultContentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiDefaultContentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiDefaultContentSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/settings/default-content/{slot}/restore": {
      "post": {
        "tags": [
          "Settings"
        ],
        "summary": "Restore a slot's product default",
        "description": "Deletes the Account's own text for one slot (`SupplierDescription`, `RiskDescription`, `IncidentDescription`, `ChangeDescription`, an `AssetDescription{Kind}` slot such as `AssetDescriptionHardware`, or `SupplierReview`), so new records start from the product default again. The other slots keep their text. An unknown slot answers 404.",
        "operationId": "settings.restore-default-content",
        "parameters": [
          {
            "name": "slot",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiDefaultContentSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/settings/task-mail": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get the Task mail settings",
        "description": "Returns the Account's Task mail setting (`enabled`; on unless someone turned it off) and your own Task mail preference (`FollowAccount`, `On`, or `Off`), as the Email Settings page shows them side by side. Whether you get the daily Task mail follows your preference, or the Account setting while you follow it.",
        "operationId": "settings.get-task-mail",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskMailSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Settings"
        ],
        "summary": "Turn the Account's Task mail on or off",
        "description": "Sets the Account's Task mail setting to `enabled` (required) for everyone who follows it. A Person's own preference still overrides it for them. Takes effect from the next day's Task mail.",
        "operationId": "settings.update-task-mail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskMailSettingUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskMailSettingUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskMailSettingUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskMailSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/settings/task-mail/preference": {
      "patch": {
        "tags": [
          "Settings"
        ],
        "summary": "Set your own Task mail preference",
        "description": "Sets your own Task mail preference (required): `On` or `Off` choose for yourself, `FollowAccount` goes back to the Account setting. It changes only your own preference; no call can change another Person's.",
        "operationId": "settings.update-task-mail-preference",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskMailPreferenceUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskMailPreferenceUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskMailPreferenceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskMailSettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/settings/countries": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get the Countries",
        "description": "Returns the countries the Account operates in, as the Countries Settings page shows them: `countries` holds ISO 3166-1 alpha-2 codes such as `NL`, empty until one is set, and `supportedCountries` lists every code that can be set with its name in your UI language. Frameworks with a national version, such as NIS2, follow this list.",
        "operationId": "settings.get-countries",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCountrySettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "put": {
        "tags": [
          "Settings"
        ],
        "summary": "Replace the Countries",
        "description": "Replaces the whole list of countries the Account operates in with `countries` (required; ISO 3166-1 alpha-2 codes, duplicates dropped, `[]` clears the list), as the Countries Settings page's Save does. A code outside `supportedCountries` answers 422 and changes nothing. The Sub-frameworks of the adopted parent Frameworks follow the list at once, as on the page, with no confirm step: `sync` names the Sub-frameworks it adopted and unadopted (removing a country unadopts its Sub-framework and deletes its Requirement records and Schedules) and the listed countries with no Sub-framework yet.",
        "operationId": "settings.update-countries",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCountriesUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCountriesUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCountriesUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCountrySettings"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers/{id}/comments": {
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "List a Supplier's Comments",
        "description": "Every Comment on the Supplier, oldest first: whole-Supplier Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "suppliers.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Comment on a Supplier",
        "description": "Adds a Comment as you. Without `phrase` it is on the Supplier as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on a Supplier, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies the Relationship Owner and anyone Mentioned.",
        "operationId": "suppliers.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Edit a Comment on a Supplier",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Supplier Comment cannot become a Phrase Comment.",
        "operationId": "suppliers.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Delete a Comment on a Supplier",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "suppliers.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers": {
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "List Suppliers",
        "description": "Lists the Supplier register with OData query options over stored fields (camelCase): `$filter` (e.g. `status eq 'Active' and criticality eq 'Critical'`, `processesPersonalData eq true`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Active`, `SaaS`). `nextOffset` is the `$skip` for the next page, or null on the last one. Derived facts (reviews, owned Assets, Risks) come from the single get.",
        "operationId": "suppliers.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Create a Supplier",
        "description": "Records a Supplier (numbered SUP-###) and enrols it in Supplier Review on its Criticality's Cadence. `name` is required. `category` defaults to `SaaS`, `criticality` to `Important`, and `status` to `Onboarding`. `Terminated` records a contract that already ended and needs `terminatedAt`; its review starts paused. `website` is an optional absolute `http` or `https` URL of at most 2048 characters. `relationshipOwnerKind` (`Person` or `Role`) with `relationshipOwnerId` names the Relationship Owner; omit it for none. Answers 201 with the new Supplier.",
        "operationId": "suppliers.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplier"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers/{id}": {
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Get a Supplier",
        "description": "Returns the whole Supplier with what its Details page shows: the next Supplier Review due, the open review task, the review opt-out state and history, the ten most recent recorded Supplier Reviews and their count, the still-held Assets it owns (`ownedAssets`), and the Risks that name it (`risks`).",
        "operationId": "suppliers.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplier"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Change a Supplier",
        "description": "Changes the fields you send and keeps the rest; `null` clears `descriptionHtml`, `country`, `website`, or the Relationship Owner. `website` is an absolute `http` or `https` URL of at most 2048 characters. `status` moves between `Onboarding`, `Active`, `UnderReview`, and `Terminating`: a change into or out of `Terminated` answers 422 naming the action to call instead (`POST /api/v1/suppliers/{id}/terminate` or `/reactivate`). A `criticality` change re-syncs the Supplier Review clock to that Criticality's Cadence. `terminatedAt` only corrects the date a Terminated Supplier already has.",
        "operationId": "suppliers.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplier"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Delete a Supplier",
        "description": "Permanently deletes a Supplier recorded in error, with its open review task. To record that a real relationship ended, Terminate it instead. A Supplier still referenced elsewhere (for example as an Asset's owner) answers 409.",
        "operationId": "suppliers.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers/{id}/terminate": {
      "post": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Terminate a Supplier",
        "description": "Records that the relationship ended on `terminatedAt` (default today): status `Terminated`, its Supplier Review paused, and the Assets it owns Returned to owner as of that day. `assetIdsToReturn` names which owned Assets go back; omit it to return all of them, or send `[]` to keep them all in the register. A Terminated Supplier answers 409.",
        "operationId": "suppliers.terminate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiSupplierTerminateRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiSupplierTerminateRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiSupplierTerminateRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplier"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers/{id}/reactivate": {
      "post": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Reactivate a Supplier",
        "description": "Returns a Terminated Supplier to `Active`, clearing its termination date and resuming its Supplier Review (next due one Cadence after the last review, or from today when never reviewed). Assets returned at Terminate stay returned. A Supplier that is not Terminated answers 409.",
        "operationId": "suppliers.reactivate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplier"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers/{id}/opt-out": {
      "post": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Opt a Supplier out of Supplier Review",
        "description": "Stops the Supplier's Supplier Review: cancels the open review task and records your `reason` (required) in the opt-out history. A Terminated Supplier's review has already stopped, so it answers 409. Resume with `POST /api/v1/suppliers/{id}/resume-review`.",
        "operationId": "suppliers.opt-out",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiReviewOptOutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplier"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers/{id}/resume-review": {
      "post": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Resume a Supplier's Supplier Review",
        "description": "Ends the Supplier's review opt-out. When its Criticality's Cadence is an interval, the next review is due that interval after the last one (or from today when never reviewed). A Supplier that is not opted out, or is Terminated, answers 409.",
        "operationId": "suppliers.resume-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplier"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers/{id}/reviews": {
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "List a Supplier's Reviews",
        "description": "Every recorded Supplier Review, newest first: the day it was performed, who recorded it, its `outcome` (`Continue`, `ContinueWithConditions`, `Terminate`), its body, and the next review due it set.",
        "operationId": "suppliers.list-reviews",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiSupplierReview"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Record a Supplier Review",
        "description": "Records a Supplier Review as you by completing the Supplier's open review task, which also opens the next one: `outcome` (required: `Continue`, `ContinueWithConditions`, or `Terminate`), `reviewedAt` (default today), and `bodyHtml` (optional, may be empty). The outcome `Terminate` does not end the relationship; call `POST /api/v1/suppliers/{id}/terminate` for that. A Supplier with no open review task (Terminated, opted out, or a none Cadence) answers 409.",
        "operationId": "suppliers.record-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierReviewCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierReviewCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierReviewCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierReview"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/suppliers/{id}/reviews/{reviewId}": {
      "patch": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Correct a Supplier Review",
        "description": "Corrects a recorded Supplier Review's `reviewedAt`, `outcome`, or `bodyHtml`; an omitted field keeps its value, and `null` clears the body (`reviewedAt` and `outcome` cannot be cleared). Correcting the newest review also moves the next review due (the new date plus the Criticality Cadence). No new review task opens, and the reviewer stays who recorded it.",
        "operationId": "suppliers.update-review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reviewId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierReviewUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierReviewUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierReviewUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierReview"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks/{id}/comments": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "List a Task's Comments",
        "description": "Every Comment on the Task, oldest first. Tasks take whole-Task Comments only (`phrase` is always null). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "tasks.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Comment on a Task",
        "description": "Adds a Comment on the Task as you (rich text). Tasks take no Phrase Comments, so a `phrase` answers 422. Notifies anyone Mentioned.",
        "operationId": "tasks.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Tasks"
        ],
        "summary": "Edit a Comment on a Task",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment.",
        "operationId": "tasks.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Tasks"
        ],
        "summary": "Delete a Comment on a Task",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "tasks.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "List Tasks",
        "description": "Lists every Task of the Account (ad-hoc tasks and the ones registers spawn: reviews, workflow steps, training assignments) with OData query options over stored fields (camelCase): `$filter` (e.g. `state eq 'Open' and source eq 'AdHoc'`), `$select`, `$orderby` (e.g. `dueAt`), `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. `nextOffset` is the `$skip` for the next page, or null on the last one. Links, workflow step, and the result form come from the single get.",
        "operationId": "tasks.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Create a Task",
        "description": "Records an ad-hoc task (numbered TSK-####), Open. `title` is required. Omit `ownerKind` to own it yourself as a Person; the Owner and the optional Assignee are each a Person or a Role (a Role-assigned task is one shared task, never copied per holder). `links` relate it to other records by entity type name and id. Tasks a register owns (reviews, workflow steps, training) are spawned by that register, not created here. Answers 201 with the new Task.",
        "operationId": "tasks.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks/{id}": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "Get a Task",
        "description": "Returns the whole Task with what its Details page shows: the records it is linked to, attached Evidence, its workflow step and due-date urgency, what completing it asks for (`resultForm`, with the `outcomeOptions` complete takes), the register's own form for a task recorded there (`richCompletion`), and, on an open Asset review, the member Assets and the Custodian's Assets left out (`assetReview`).",
        "operationId": "tasks.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Tasks"
        ],
        "summary": "Change a Task",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does: `title`, `descriptionHtml`, `dueAt`, `requiresEvidence`, the Owner, the Assignee (`assigneeKind: null` hands the task back to the Owner), and, on an ad-hoc task only, `links` (the whole Related to set; a spawned task's links are fixed and answer 422). A Cancelled task, or a Done or Cancelled attestation task, keeps its Owner and Assignee. `state` only takes the current state: use `POST /api/v1/tasks/{id}/start`, `/complete`, or `/cancel`. The result is saved with `/save-result`, a recorded date corrected with `/correct-recorded-date`.",
        "operationId": "tasks.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Tasks"
        ],
        "summary": "Delete a Task",
        "description": "Permanently deletes a task created in error. This is not Cancel, which records a real task being called off. A task that is still referenced answers 409.",
        "operationId": "tasks.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks/{id}/start": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Start a Task",
        "description": "Moves an Open task to InProgress and changes nothing else: no result, no date, no next step. Assignment plays no part. A task that is not Open answers 409.",
        "operationId": "tasks.start",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks/{id}/complete": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Complete a Task",
        "description": "Marks an Open or InProgress task Done, as the Task page's Mark Done does, and runs its register's next step (for example a Finding's corrective action after its root cause). `resultHtml` is the written result, required when `resultForm.isResultRequired`; `outcome` is one of `resultForm.outcomeOptions` when the task has any. `completedAt` records a day in the past; it cannot be in the future, before the linked Finding or Vulnerability was raised, or before an earlier step of the same workflow (422). A task that requires Evidence needs it attached first (422). A task already Done or Cancelled answers 409. The training task of a Library course (`resultForm.canComplete` is false) is never completed by hand, by anyone: it answers 422, and the trainee completes it by passing the course on the Task page. A Schedule reminder (`ScheduleNextOccurrence`) closes only with an Event: send exactly one of `event` (a new Event of the Schedule's kind, Framework, and Continuity Plan; a Continuity test Schedule's Event needs `event.continuityTest` with its results, as `POST /events` takes them) or `eventId` (one of `richCompletion.countableOneOffs`, which then counts toward the Schedule); neither, both, a One-off that does not match, or an Event dated after today (`event.occurredAt`, or an `eventId` One-off dated later; book it with `POST /events` counting toward the Schedule instead) answers 422 and the task stays open, and so do `outcome`, `resultHtml`, and `completedAt`, which a reminder does not take. Answers the completed task; any next step is a new task.",
        "operationId": "tasks.complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiTaskComplete"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiTaskComplete"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiTaskComplete"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks/{id}/cancel": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Cancel a Task",
        "description": "Calls off an Open or InProgress task: it becomes Cancelled, with you and now as who and when. A task already Done or Cancelled answers 409, and so does a step of a Finding's or a Vulnerability's workflow: reject the Finding, or complete the step with the outcome that applies.",
        "operationId": "tasks.cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks/{id}/correct-recorded-date": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Correct a Done Task's recorded date",
        "description": "Moves the day a Done task's work was recorded as happening, without reopening it: the state, the result, and the workflow stay put. `recordedAt` is required; it cannot be in the future, before the linked Finding or Vulnerability was raised, or out of order with the other steps of the same workflow (422). A task that is not Done answers 409. The Task's History records the change; no Comment is written.",
        "operationId": "tasks.correct-recorded-date",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskRecordedDate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskRecordedDate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskRecordedDate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks/{id}/save-result": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Save a Task's result",
        "description": "Stores `resultHtml` without completing the task or changing its state: an Open task stays Open, and a Done task's result is corrected in place. An empty result is allowed. A Cancelled task answers 409.",
        "operationId": "tasks.save-result",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskResult"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskResult"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskResult"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/tasks/{id}/change-custodian": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Change a member Asset's Custodian on an Asset review",
        "description": "On an open Asset review task, hands one member Asset (`assetId`) to a new Custodian (`custodianKind` `Person` or `Role`, with `custodianId`), as the review's Change custodian does. The Asset then leaves this review for the new Custodian's; when it was the last member, the review ends. Answers the task. A bad body answers 422 first (an Asset that is not a live member of the open review included); a valid body on a task that is not an open Asset review answers 409.",
        "operationId": "tasks.change-custodian",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskCustodianChange"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskCustodianChange"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskCustodianChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/task-templates": {
      "get": {
        "tags": [
          "Task templates"
        ],
        "summary": "List Task templates",
        "description": "Lists the Account's recurring Ad-hoc Task templates with OData query options over stored fields (camelCase): `$filter` (e.g. `active eq true`), `$select`, `$orderby` (e.g. `nextSpawnAt`), `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id` and `url` (templates have no display code); without `$select` that is all it carries. `nextOffset` is the `$skip` for the next page, or null on the last one.",
        "operationId": "task-templates.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Task templates"
        ],
        "summary": "Create a Task template",
        "description": "Records an active recurring Ad-hoc Task template, as the New Template page does. `titleTemplate` is required. `recurrenceDays` defaults to 30 and must be at least 1; `defaultDueOffsetDays` must be 0 or more; either answers 422 otherwise. Omit `defaultOwnerKind` to own the spawned tasks yourself as a Person; the default Owner and optional default Assignee are each a Person or a Role. The first task is spawned at `nextSpawnAt`; omit it to plan none yet. Answers 201 with the new template.",
        "operationId": "task-templates.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskTemplateCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskTemplateCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskTemplateCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskTemplate"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/task-templates/{id}": {
      "get": {
        "tags": [
          "Task templates"
        ],
        "summary": "Get a Task template",
        "description": "Returns the whole Ad-hoc Task template: what the tasks it spawns look like (title, description, default Owner and Assignee, due offset, Evidence requirement), how often it spawns (`recurrenceDays`), and when next (`nextSpawnAt`).",
        "operationId": "task-templates.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskTemplate"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Task templates"
        ],
        "summary": "Change a Task template",
        "description": "Changes the fields you send and keeps the rest, as the Edit Template page does, on an Ad-hoc Task template (a register entry's template answers 404); `null` clears `descriptionTemplate`, `defaultDueOffsetDays`, `nextSpawnAt`, or the default Assignee (`defaultAssigneeKind: null`). `active: false` pauses spawning. Tasks already spawned keep what they were given. `recurrenceDays` must be at least 1 and `defaultDueOffsetDays` 0 or more, or it answers 422.",
        "operationId": "task-templates.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskTemplateUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskTemplateUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTaskTemplateUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskTemplate"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/training-courses": {
      "get": {
        "tags": [
          "Training courses"
        ],
        "summary": "List Training Courses",
        "description": "Lists the Training curriculum with OData query options over stored fields (camelCase): `$filter` (e.g. `category eq 'Phishing'`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. A Library course's `title`, `category`, and `descriptionHtml` are read from the Course library in your UI language when selected, but `$filter` and `$orderby` read the stored fields, which are null on a Library course: filter those on `librarySlug` (which names the library course), not on its title or category. `nextOffset` is the `$skip` for the next page, or null on the last one. Assignments come from the single get.",
        "operationId": "training-courses.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Training courses"
        ],
        "summary": "Create a Training Course",
        "description": "Records a course in the Training curriculum (numbered TRN-###). `title` is required; `category` defaults to `SecurityAwareness`, `repeats` to true, `audience.kind` to `Nobody`. `audience.kind` says who must take it: `Nobody` (people are assigned by hand), `Everyone` (everyone in the Attestation population), or `Roles` (the holders of `audience.roleIds`, at least one Role of the Account); any other kind ignores `roleIds`. `contentUrl` must be an http(s) URL. Saving a course with an `Everyone` or `Roles` audience gives each person in it their training Task, except that a repeating course gets none while the Training Cadence is none; people outside the audience are assigned by hand (`POST /api/v1/training-courses/{id}/assignments` or `/assign-all`). Answers 201 with the new course.",
        "operationId": "training-courses.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingCourseCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingCourseCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingCourseCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTrainingCourse"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/training-courses/{id}": {
      "get": {
        "tags": [
          "Training courses"
        ],
        "summary": "Get a Training Course",
        "description": "Returns the whole Training Course with what its Details page shows: every assignment of it, each with its Person, state, due date, and task, and the Requirements it covers (`linkedRequirements`).",
        "operationId": "training-courses.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTrainingCourse"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Training courses"
        ],
        "summary": "Change a Training Course",
        "description": "Changes the fields you send and keeps the rest, as the Edit page does; `null` clears `descriptionHtml`, `contentUrl`, or `contentEvidenceId`. `audience` replaces the audience: an omitted `audience.kind` keeps the current kind and omitted `audience.roleIds` keep the stored Roles, and `Roles` with no Role answers 422 on `audience.kind`. Existing assignments keep their task titles. A Library course (`librarySlug` set) takes its text from the Course library: sending `title`, `descriptionHtml`, `contentUrl`, `contentEvidenceId`, or `category` for it answers 422 on that field, and only `repeats` and `audience` change.",
        "operationId": "training-courses.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingCourseUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingCourseUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingCourseUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTrainingCourse"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/training-courses/from-library": {
      "post": {
        "tags": [
          "Training courses"
        ],
        "summary": "Add a course from the Course library",
        "description": "Adds the Course library course `slug` (see `GET /api/v1/course-library`) to the Account as a Library course, as the Course library page's Add does: it takes the next TRN- code and `repeats` is true. Answers 201 with the new course and a `Location`. An Account holds each library course once, so a `slug` it already holds answers 200 with the existing course and adds nothing. An unknown or missing `slug` answers 422 on `slug`.",
        "operationId": "training-courses.add-from-library",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingCourseFromLibrary"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingCourseFromLibrary"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingCourseFromLibrary"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTrainingCourse"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/training-courses/{id}/assignments": {
      "post": {
        "tags": [
          "Training courses"
        ],
        "summary": "Assign a Training Course to People",
        "description": "Gives each of `personIds` a Training assignment task for this course, as Assign training does: the Person is the Assignee, you are the Owner. `dueAt` defaults to 30 days from today and cannot be in the past. A Person who already has an open (Open or InProgress) assignment of the course is skipped, never assigned twice. Answers the tasks created, the People skipped, and the course.",
        "operationId": "training-courses.assign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingAssignmentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingAssignmentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTrainingAssignmentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTrainingAssignmentResult"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/training-courses/{id}/assign-all": {
      "post": {
        "tags": [
          "Training courses"
        ],
        "summary": "Assign a Training Course to everyone",
        "description": "Gives every Active Person a Training assignment task for this course, as the course's Assign all does: the Person is the Assignee, you are the Owner. `dueAt` defaults to 30 days from today and cannot be in the past; the body may be left out. People who already have an open (Open or InProgress) assignment of the course are skipped. Answers the tasks created, the People skipped, and the course.",
        "operationId": "training-courses.assign-all",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiTrainingAssignAll"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiTrainingAssignAll"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiTrainingAssignAll"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTrainingAssignmentResult"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/training-courses/{id}/link-requirements": {
      "post": {
        "tags": [
          "Training courses"
        ],
        "summary": "Set the Requirements a Training Course covers",
        "description": "Replaces the Training Course's covered Requirements with `requirements` (each `frameworkId` and `code`, e.g. `iso-27001-2022` and `A.6.3`); `[]` clears them. A Library course links the same way. An added Requirement must belong to an adopted Framework and must not be Excluded, or the call answers 422 and changes nothing. A link the Training Course already has may stay.",
        "operationId": "training-courses.link-requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiLinkRequirementsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTrainingCourse"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/training-courses/{id}/comments": {
      "get": {
        "tags": [
          "Training courses"
        ],
        "summary": "List a Training Course's Comments",
        "description": "Every Comment on the course, oldest first: whole-course Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "training-courses.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Training courses"
        ],
        "summary": "Comment on a Training Course",
        "description": "Adds a Comment as you. Without `phrase` it is on the course as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on a course, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "training-courses.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/training-courses/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Training courses"
        ],
        "summary": "Edit a Comment on a Training Course",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-course Comment cannot become a Phrase Comment.",
        "operationId": "training-courses.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Training courses"
        ],
        "summary": "Delete a Comment on a Training Course",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "training-courses.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/vulnerabilities/{id}/comments": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "List a Vulnerability's Comments",
        "description": "Every Comment on the Vulnerability, oldest first: whole-Vulnerability Comments (`phrase` null) and Phrase Comments on its description (`phrase.field` = `descriptionHtml`, with the selected `letters` and which `copy`). `bodyHtml` is the body as stored, `bodyText` the same as plain text; `authorUserId` is the User who last saved it.",
        "operationId": "vulnerabilities.list-comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Comment on a Vulnerability",
        "description": "Adds a Comment as you. Without `phrase` it is on the Vulnerability as a whole (rich text). With `phrase` { `field`, `letters`, `copy`? } it is a Phrase Comment on those letters in that field (plain text plus Mentions); only `descriptionHtml` takes Phrase Comments on a Vulnerability, and another field answers 422. `copy` says which occurrence (from 1) when the letters appear more than once. Notifies anyone Mentioned.",
        "operationId": "vulnerabilities.add-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/vulnerabilities/{id}/comments/{commentId}": {
      "patch": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Edit a Comment on a Vulnerability",
        "description": "Replaces the Comment's body; you become its author. Any Account member may edit any Comment. On a Phrase Comment, `phrase` { `letters`, `copy` } may move it to other letters in the same field; the field itself cannot change, and a whole-Vulnerability Comment cannot become a Phrase Comment.",
        "operationId": "vulnerabilities.update-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCommentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiComment"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Delete a Comment on a Vulnerability",
        "description": "Removes the Comment. Any Account member may delete any Comment.",
        "operationId": "vulnerabilities.delete-comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/vulnerabilities": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "List Vulnerabilities",
        "description": "Lists the Vulnerability register with OData query options over stored fields (camelCase): `$filter` (e.g. `severity eq 'Critical' and cvssScore ge 9`, `externalIdentifier eq 'CVE-2024-3094'`), `$select`, `$orderby`, `$expand`, `$top` (default 50, at most 200), and `$skip`. Every row carries `id`, `code`, and `url`; without `$select` that is all it carries. Enum values are member names (`Critical`, `Scanner`). `nextOffset` is the `$skip` for the next page, or null on the last one. The workflow state is derived from the chain tasks, so it comes from the single get.",
        "operationId": "vulnerabilities.list",
        "parameters": [
          {
            "name": "$filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$select",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$orderby",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$expand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "$skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfIReadOnlyDictionaryOfstringAndObject"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Record a Vulnerability",
        "description": "Records a Vulnerability (numbered VUL-###) and opens its Remediation task, owned and assigned to you, due by severity: 7 days for `Critical`, 30 `High`, 90 `Medium`, 180 `Low`. `title` is required. `severity` defaults to `Medium`, `source` to `Manual`, and `discoveredAt` to today (not in the future). `cvssScore` runs 0.0 to 10.0. Omit `ownerKind` to own it yourself as a Person; send `null` for no Owner. `affectedAssetIds` name Assets that are not Retired, and `discoveredDuringEventId` an Event, both in the Account. `externalLink` is an optional absolute `http` or `https` URL of at most 2048 characters to the matching item in your tracker; it is separate from `sourceReference`. Answers 201 with the new Vulnerability.",
        "operationId": "vulnerabilities.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiVulnerability"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/vulnerabilities/{id}": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get a Vulnerability",
        "description": "Returns the whole Vulnerability with what its Details page shows: the affected Assets, the Event it was discovered during, the workflow state derived from its Remediation and Verification chain (`Open`, `RemediationInProgress`, `AwaitingVerification`, `Resolved`, `Accepted`, `FalsePositive`) and whether it is finished, the chain step it waits on, the Risk that captures an accepted risk, whether Attachments can be added, every chain task with its written result (oldest first), and its `externalLink`.",
        "operationId": "vulnerabilities.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiVulnerability"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "patch": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Change a Vulnerability",
        "description": "Changes the fields you send and keeps the rest; `null` clears `externalIdentifier`, `descriptionHtml`, `cvssScore`, `sourceReference`, `discoveredDuringEventId`, the Owner, `affectedAssetIds`, or `externalLink`. `affectedAssetIds` replaces the whole set. `externalLink` is an absolute `http` or `https` URL of at most 2048 characters. A severity change does not move the open Remediation deadline. The workflow does not change here: complete the chain step's Task, or call `POST /api/v1/vulnerabilities/{id}/accept-risk` or `/mark-false-positive`; a `workflowState` other than the current one answers 422.",
        "operationId": "vulnerabilities.update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiVulnerability"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Delete a Vulnerability",
        "description": "Permanently deletes a Vulnerability logged in error, and cancels its open chain task. A real Vulnerability ends through its chain instead: remediated and verified, accepted as a risk, or marked a False Positive. A Vulnerability still referenced elsewhere answers 409.",
        "operationId": "vulnerabilities.delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/vulnerabilities/{id}/accept-risk": {
      "post": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Accept a Vulnerability as a risk",
        "description": "Completes the open Remediation task as Accepted: the organisation lives with the Vulnerability, captured by `riskId`, a Risk that is not Closed or Accepted, with `rationaleHtml` (required) as the written result. Its workflow state becomes `Accepted`. Answers 409 when the open chain step is not a Remediation (awaiting verification, or already finished).",
        "operationId": "vulnerabilities.accept-risk",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityAcceptRiskRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityAcceptRiskRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityAcceptRiskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiVulnerability"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/vulnerabilities/{id}/mark-false-positive": {
      "post": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Mark a Vulnerability a False Positive",
        "description": "Completes the open Remediation task as a False Positive, with `rationaleHtml` (required) as the written result: it was never a real vulnerability. Its workflow state becomes `FalsePositive`, and it takes no new Attachments. Answers 409 when the open chain step is not a Remediation (awaiting verification, or already finished).",
        "operationId": "vulnerabilities.mark-false-positive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityFalsePositiveRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityFalsePositiveRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiVulnerabilityFalsePositiveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiVulnerability"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/events/{eventId}/vulnerabilities": {
      "post": {
        "tags": [
          "Events"
        ],
        "summary": "Record a Vulnerability discovered during an Event",
        "description": "Records a Vulnerability discovered during this Event, as the Event's New Vulnerability page does, and opens its Remediation task, owned and assigned to you, due by severity: 7 days for `Critical`, 30 `High`, 90 `Medium`, 180 `Low`. The fields are those of `POST /api/v1/vulnerabilities` without `discoveredDuringEventId`, which is this Event. Answers 201 with the new Vulnerability.",
        "operationId": "events.create-vulnerability",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventVulnerabilityCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventVulnerabilityCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiEventVulnerabilityCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiVulnerability"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/uploads": {
      "post": {
        "tags": [
          "Uploads"
        ],
        "summary": "Make an Upload link",
        "description": "Returns a link that takes one file for you in this Account, with no bearer. `target` is what the file becomes: `evidence`, `attachment`, `import`, or `conversation`. Send a small file as one `PUT <url>` with the raw bytes, which also finishes it (Evidence and Attachments up to 50 MiB, Conversation Attachments up to `maxBytes`). Send a large file, such as an Import ZIP, in parts of at most `partSize` bytes: `PUT <url>?offset=N` for each, in order, then `POST <url>/finish` with `{ totalBytes, fileName }`. A wrong offset answers 409 with `bytesReceived`; `GET <url>` tells how many bytes arrived, so a broken upload continues where it stopped. Send the first part before `expiresAt`; each part keeps the link open 15 minutes longer. Once finished, name `uploadId` in the one call that takes it. A person can also open `url` in a browser and pick the file there.",
        "operationId": "uploads.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiUploadCreate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiUploadCreate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiUploadCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiUploadLink"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/license": {
      "get": {
        "tags": [
          "License"
        ],
        "summary": "Get the Account's Compliance License",
        "description": "Returns the current Compliance License of the Account acted in: its kind (`paid`, `trial`, or `complimentary`), validity dates, the Framework lines it covers, and the Assistant allowance (included and extra funds left, whether the Assistant can spend, and the Auto-topup state). Use it to check what the Account may use before starting Assistant work.",
        "operationId": "license.get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiLicense"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/license/auto-topup": {
      "patch": {
        "tags": [
          "License"
        ],
        "summary": "Change Auto-topup",
        "description": "Changes Auto-topup as the Allowance tab's form does: `enabled`, `packUsd` (10, 25, or 100), and `monthlyLimitUsd` (the Monthly spending limit); an omitted field keeps its saved value. Turning it off, a lower pack, or a lower limit saves at once and answers the License. Turning it on, a higher pack, or a higher limit saves nothing and answers 403 `browser-handoff`: `handoffUrl` opens the Allowance tab with all three values filled in, where the Owner presses Save. A pack not on sale, or a limit below the pack, answers 422. Owner only; a Member gets 403 `forbidden`.",
        "operationId": "license.update-auto-topup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAutoTopupChange"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAutoTopupChange"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAutoTopupChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiLicense"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/license/allowance-packs": {
      "post": {
        "tags": [
          "License"
        ],
        "summary": "Hand buying an Allowance pack off to the browser",
        "description": "Buying an Allowance pack charges money, so this answers 403 `browser-handoff`. With `packUsd` (10, 25, or 100), `handoffUrl` is the pack's hosted Stripe Checkout, where the Owner pays; the pack's funds arrive once they do. Without it, `handoffUrl` is the Allowance tab, where the Owner picks a pack. A pack not on sale answers 422. Owner only; a Member gets 403 `forbidden`.",
        "operationId": "license.buy-allowance-pack",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiAllowancePackBuy"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiAllowancePackBuy"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApiAllowancePackBuy"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/conversations": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "List conversations",
        "description": "The User's conversations with our Assistant, newest first, as the panel's switcher lists them: their own ordinary conversations and every shared one in the Account (such as a Gap analysis). A Voice Call the User can open is listed too, and its messages can be read. When the Assistant is turned off for the Account, answers 403.",
        "operationId": "conversations.list",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiConversation"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Start a conversation",
        "description": "Starts an ordinary conversation of the User with our Assistant, private until the User shares it in the panel, on the Assistant's current model. Send the first message with `POST /api/v1/conversations/{id}/messages`. Answers 201 with the conversation.",
        "operationId": "conversations.create",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiConversation"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/conversations/{id}/messages": {
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Send a message to the Assistant",
        "description": "Sends `text` to our Assistant as the User, exactly as the panel does, and answers 202 once the message is stored and the Assistant's turn is on its way; read the reply with `GET …/messages?after={seq}&wait=60`. Answer the Assistant's questions and proposals with your next message. `pageContext` names what the message is about (the panel's Page context). `uploadIds` are finished uploads with target `conversation`, each attached as a Conversation Attachment (at most 25 MiB, a PDF, image, text, Markdown, CSV, XLSX, or DOCX file). When Topic Split judges the message a new topic, it lands in a new conversation, and `conversationId` names it. A message sent to a closed conversation lands in a new conversation too, and `conversationId` names it. A send spends the Assistant allowance: an empty allowance answers 402 `allowance-exhausted`. A private conversation with a turn still running, or a Voice Call, answers 409. A field problem answers 422.",
        "operationId": "conversations.send-message",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiConversationMessageSend"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiConversationMessageSend"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiConversationMessageSend"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiConversationMessageSent"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "402": {
            "description": "`allowance-exhausted`: The Assistant allowance is empty.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "allowance-exhausted"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      },
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Read messages",
        "description": "The conversation's messages after `after` (a `seq`; omit it for all), oldest first, with the turn state (`running` or `idle`). With `wait` (seconds, at most 60), when there are no messages after `after` yet and the Assistant is still answering, the call holds until the Assistant writes a message, its turn ends, or `wait` passes; a Voice Call that is still live never holds, and answers the transcript so far; so after a send, read with `after` set to the send's `seq` and `wait=60`, and read again while `turnState` is `running`. Each message carries its role (`user`, `assistant`, or `room`), its sender, its markdown text, its attachments, and the tools the Assistant ran before it with their outcome. Thinking never comes back.",
        "operationId": "conversations.list-messages",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "wait",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiConversationMessages"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "422": {
            "description": "`validation`: The input was refused. `errors` lists fields for a body or query that does not bind; otherwise `detail` gives the rule.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "validation"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/conversations/{id}/stop": {
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Stop the Assistant's turn",
        "description": "Asks the running turn to stop, as the panel's Stop does; the Assistant stops at its next step. Read the messages to see where it stopped. Answers the conversation. A Voice Call is stopped from the Assistant panel, so stopping one answers 409.",
        "operationId": "conversations.stop",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiConversation"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "403": {
            "description": "`no-account`: The credential is in no Account the User belongs to. `accounts` lists where it can switch to. `license-closed`: The Account's Compliance License is Closed. `detail` gives the reason. `browser-handoff`: A person must finish this act in the browser: open `handoffUrl`. `forbidden`: The act is the Account Owner's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "409": {
            "description": "`conflict`: The act clashes with the record's state.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "conflict"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/accounts": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "List the User's Accounts",
        "description": "Lists every Account the signed-in User belongs to, each with `current` true for the Account the credential acts in now. Works even when the current Account is unusable (no membership, a Closed License, no Legal Acceptance), so call it first when another call answers `no-account`.",
        "operationId": "accounts.list",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiAccountListItem"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    },
    "/api/v1/accounts/{accountId}/switch": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Switch the credential to another Account",
        "description": "Moves the credential into the Account `accountId`, so every later call acts there until the next switch. Answers with the Account list, the new Account marked `current`. An Account the User is not in answers `not-found`.",
        "operationId": "accounts.switch",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfApiAccountListItem"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: No bearer, or an unknown, ended, or expired credential. `WWW-Authenticate` names the Protected Resource Metadata.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "unauthorized"
            ]
          },
          "404": {
            "description": "`not-found`: No such record in this Account.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "not-found"
            ]
          },
          "429": {
            "description": "`rate-limited`: Over the per-User rate limit. `Retry-After` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-problem-types": [
              "rate-limited"
            ]
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiAccount": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ApiAccountListItem": {
        "required": [
          "id",
          "name",
          "current"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "current": {
            "type": "boolean"
          }
        }
      },
      "ApiActCadence": {
        "required": [
          "act",
          "cadence"
        ],
        "type": "object",
        "properties": {
          "act": {
            "enum": [
              "PolicyReview",
              "ProcedureReview",
              "ScopeReview",
              "RequirementReview",
              "RiskReview",
              "OpportunityReview",
              "AssetReview",
              "AssetAccessReview",
              "SupplierReview",
              "ContinuityPlanReview",
              "BusinessIssueReview",
              "InterestedPartyReview",
              "ObjectiveReview",
              "KpiMeasurement",
              "TrainingAssignment",
              "ScheduleNextOccurrence"
            ],
            "type": "string"
          },
          "cadence": {
            "enum": [
              "None",
              "EveryMonth",
              "EveryThreeMonths",
              "EverySixMonths",
              "EveryYear",
              "EveryTwoYears"
            ],
            "type": "string"
          }
        }
      },
      "ApiActCadenceInput": {
        "type": "object",
        "properties": {
          "act": {
            "enum": [
              "PolicyReview",
              "ProcedureReview",
              "ScopeReview",
              "RequirementReview",
              "RiskReview",
              "OpportunityReview",
              "AssetReview",
              "AssetAccessReview",
              "SupplierReview",
              "ContinuityPlanReview",
              "BusinessIssueReview",
              "InterestedPartyReview",
              "ObjectiveReview",
              "KpiMeasurement",
              "TrainingAssignment",
              "ScheduleNextOccurrence"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "cadence": {
            "enum": [
              "None",
              "EveryMonth",
              "EveryThreeMonths",
              "EverySixMonths",
              "EveryYear",
              "EveryTwoYears"
            ],
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiActivityPlan": {
        "required": [
          "id",
          "code",
          "title",
          "url",
          "lastTestedAt",
          "nextTestDueAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "lastTestedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextTestDueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ApiAllowancePackBuy": {
        "type": "object",
        "properties": {
          "packUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ApiAsset": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "name",
          "descriptionHtml",
          "kind",
          "classification",
          "ownerKind",
          "ownerId",
          "owner",
          "custodianKind",
          "custodianId",
          "location",
          "lifecycleState",
          "carriesAssetAccessReview",
          "acquiredAt",
          "leftInventoryAt",
          "externalReference",
          "retentionUnit",
          "retentionLength",
          "retentionStartingEvent",
          "accessRightRoleIds",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "accessReview",
          "risks",
          "vulnerabilities"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "kind": {
            "enum": [
              "Information",
              "Software",
              "Hardware",
              "Service",
              "People",
              "Facility"
            ],
            "type": "string"
          },
          "classification": {
            "enum": [
              "Public",
              "Internal",
              "Confidential",
              "Restricted"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Organisation",
              "Person",
              "Supplier"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "owner": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiRecordRef"
              }
            ]
          },
          "custodianKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "custodianId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "location": {
            "type": [
              "null",
              "string"
            ]
          },
          "lifecycleState": {
            "enum": [
              "Planned",
              "Active",
              "Decommissioning",
              "Retired",
              "ReturnedToOwner"
            ],
            "type": "string"
          },
          "carriesAssetAccessReview": {
            "type": "boolean"
          },
          "acquiredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "leftInventoryAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "externalReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "retentionUnit": {
            "enum": [
              "Months",
              "Years",
              "Indefinitely"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Months`, `Years`, or `Indefinitely`; null when the Asset has no Retention period."
          },
          "retentionLength": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "1 to 999 months or years; null for `Indefinitely` or no period.",
            "format": "int32"
          },
          "retentionStartingEvent": {
            "type": [
              "null",
              "string"
            ],
            "description": "The event the length counts from, such as `Employee leaves`; null for `Indefinitely` or no period."
          },
          "accessRightRoleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiAssetReview"
          },
          "accessReview": {
            "$ref": "#/components/schemas/ApiAssetAccessReview"
          },
          "risks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "vulnerabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          }
        }
      },
      "ApiAssetAccessReview": {
        "required": [
          "lastReviewedAt",
          "nextDue",
          "openTask",
          "completedCount",
          "recentCompleted"
        ],
        "type": "object",
        "properties": {
          "lastReviewedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "openTask": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiOpenTask"
              }
            ]
          },
          "completedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recentCompleted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCompletedReview"
            }
          }
        }
      },
      "ApiAssetCreate": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "kind": {
            "enum": [
              "Information",
              "Software",
              "Hardware",
              "Service",
              "People",
              "Facility"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "classification": {
            "enum": [
              "Public",
              "Internal",
              "Confidential",
              "Restricted"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Organisation",
              "Person",
              "Supplier"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "custodianKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "custodianId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "location": {
            "type": [
              "null",
              "string"
            ]
          },
          "lifecycleState": {
            "enum": [
              "Planned",
              "Active",
              "Decommissioning",
              "Retired",
              "ReturnedToOwner"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "acquiredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "leftInventoryAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "externalReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "retentionUnit": {
            "enum": [
              "Months",
              "Years",
              "Indefinitely"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "Only an `Information` Asset has a Retention period: `Months` or `Years` with a `retentionLength` of 1 to 999 and a `retentionStartingEvent` (at most 100 characters), or `Indefinitely` with neither. Omit all three for no period."
          },
          "retentionLength": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "A whole number from 1 to 999, with `retentionUnit` `Months` or `Years`.",
            "format": "int32"
          },
          "retentionStartingEvent": {
            "type": [
              "null",
              "string"
            ],
            "description": "The event the length counts from, such as `Employee leaves`; at most 100 characters."
          },
          "accessRightRoleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "carriesAssetAccessReview": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiAssetReview": {
        "required": [
          "nextDue",
          "optOut",
          "optOutHistory",
          "completedCount",
          "recentCompleted"
        ],
        "type": "object",
        "properties": {
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "optOut": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiReviewOptOutAct"
              }
            ]
          },
          "optOutHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReviewOptOutAct"
            }
          },
          "completedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recentCompleted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCompletedReview"
            }
          }
        }
      },
      "ApiAssetUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "kind": {
            "enum": [
              "Information",
              "Software",
              "Hardware",
              "Service",
              "People",
              "Facility"
            ],
            "type": "string"
          },
          "classification": {
            "enum": [
              "Public",
              "Internal",
              "Confidential",
              "Restricted"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the classification, which an `Information` Asset refuses."
          },
          "ownerKind": {
            "enum": [
              "Organisation",
              "Person",
              "Supplier"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The owning Person or Supplier; `null` clears it, which an Asset owned by a Person or Supplier refuses.",
            "format": "uuid"
          },
          "custodianKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `custodianId`. A change moves the Asset to the new Custodian's Asset Review. `null` removes the Custodian, which only an end state allows."
          },
          "custodianId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Custodian's id; `null` removes it, with `custodianKind` `null`, which only an end state allows.",
            "format": "uuid"
          },
          "location": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the location."
          },
          "lifecycleState": {
            "enum": [
              "Planned",
              "Active",
              "Decommissioning",
              "Retired",
              "ReturnedToOwner"
            ],
            "type": "string"
          },
          "externalReference": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the external reference."
          },
          "accessRightRoleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the whole set of Roles that may get into the Asset; `null` or `[]` clears it."
          },
          "acquiredAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the acquisition date.",
            "format": "date"
          },
          "leftInventoryAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Corrects the date a Retired or Returned-to-owner Asset left the inventory; `null` is refused on an Asset that has the date.",
            "format": "date"
          },
          "retentionUnit": {
            "enum": [
              "Months",
              "Years",
              "Indefinitely"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "Only an `Information` Asset has a Retention period. `Months` or `Years` need `retentionLength` and `retentionStartingEvent`; `Indefinitely` drops both. `null` clears the whole period."
          },
          "retentionLength": {
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "A whole number from 1 to 999; omitting it keeps the stored length.",
            "format": "int32"
          },
          "retentionStartingEvent": {
            "type": [
              "null",
              "string"
            ],
            "description": "The event the length counts from, at most 100 characters; omitting it keeps the stored event."
          }
        }
      },
      "ApiAssistantAllowance": {
        "required": [
          "includedBudgetUsd",
          "includedSpentUsd",
          "remainingIncludedUsd",
          "remainingExtraUsd",
          "remainingTotalUsd",
          "canSpend",
          "autoTopup"
        ],
        "type": "object",
        "properties": {
          "includedBudgetUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "includedSpentUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "remainingIncludedUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "remainingExtraUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "remainingTotalUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "canSpend": {
            "type": "boolean"
          },
          "autoTopup": {
            "$ref": "#/components/schemas/ApiAutoTopup"
          }
        }
      },
      "ApiAssistantSettings": {
        "required": [
          "account",
          "contentLanguage",
          "supportedLanguages",
          "allowance"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "contentLanguage": {
            "type": "string"
          },
          "supportedLanguages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowance": {
            "$ref": "#/components/schemas/ApiAssistantAllowance"
          }
        }
      },
      "ApiAttachment": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "description",
          "fileName",
          "contentType",
          "byteSize",
          "sha256",
          "webAddress",
          "createdAt",
          "uploadedByUserId",
          "filedOn"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "fileName": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          },
          "byteSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "sha256": {
            "type": [
              "null",
              "string"
            ]
          },
          "webAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "uploadedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "filedOn": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiFileLink"
            }
          }
        }
      },
      "ApiAttachmentCreate": {
        "required": [
          "title",
          "target"
        ],
        "type": "object",
        "properties": {
          "uploadId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid",
            "x-upload-target": "attachment"
          },
          "webAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "target": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiFileTargetInput"
              }
            ]
          }
        }
      },
      "ApiAttestation": {
        "required": [
          "covered",
          "people"
        ],
        "type": "object",
        "properties": {
          "covered": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiAttestationPerson"
            }
          }
        }
      },
      "ApiAttestationPerson": {
        "required": [
          "personId",
          "name",
          "covered",
          "openTask"
        ],
        "type": "object",
        "properties": {
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "covered": {
            "type": "boolean"
          },
          "openTask": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiOpenTask"
              }
            ]
          }
        }
      },
      "ApiAutoTopup": {
        "required": [
          "enabled",
          "packUsd",
          "monthlySpendingLimitUsd",
          "spentThisMonthUsd",
          "lastChargeFailed"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "packUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "monthlySpendingLimitUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "spentThisMonthUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lastChargeFailed": {
            "type": "boolean"
          }
        }
      },
      "ApiAutoTopupChange": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "packUsd": {
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "monthlyLimitUsd": {
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ApiBusinessIssue": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "descriptionHtml",
          "kind",
          "category",
          "status",
          "raisedAt",
          "archivedAt",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "linkedRequirements",
          "responses"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "Internal",
              "External"
            ],
            "type": "string"
          },
          "category": {
            "enum": [
              "Regulatory",
              "Technological",
              "Market",
              "Cultural",
              "Financial",
              "KeyPerson",
              "Geographic",
              "Other"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": "string"
          },
          "raisedAt": {
            "type": "string",
            "format": "date"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiContextReview"
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiContextResponse"
            }
          }
        }
      },
      "ApiBusinessIssueCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "kind": {
            "enum": [
              "Internal",
              "External"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "enum": [
              "Regulatory",
              "Technological",
              "Market",
              "Cultural",
              "Financial",
              "KeyPerson",
              "Geographic",
              "Other"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "raisedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiBusinessIssueUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "kind": {
            "enum": [
              "Internal",
              "External"
            ],
            "type": "string"
          },
          "category": {
            "enum": [
              "Regulatory",
              "Technological",
              "Market",
              "Cultural",
              "Financial",
              "KeyPerson",
              "Geographic",
              "Other"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the category."
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": "string"
          },
          "raisedAt": {
            "type": "string",
            "format": "date"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only corrects the date of an archived issue; `null` answers 422 once the date is set.",
            "format": "date"
          }
        }
      },
      "ApiCadenceSettings": {
        "required": [
          "account",
          "acts",
          "supplierReview"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "acts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiActCadence"
            }
          },
          "supplierReview": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSupplierReviewCadence"
            }
          }
        }
      },
      "ApiCadenceSettingsUpdate": {
        "type": "object",
        "properties": {
          "acts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiActCadenceInput"
            }
          },
          "supplierReview": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSupplierReviewCadenceInput"
            }
          }
        }
      },
      "ApiChainTask": {
        "required": [
          "id",
          "code",
          "step",
          "stepLabel",
          "state",
          "dueAt",
          "completedAt",
          "completedByUserId",
          "resultHtml",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "step": {
            "type": "string"
          },
          "stepLabel": {
            "type": "string"
          },
          "state": {
            "enum": [
              "Open",
              "InProgress",
              "Done",
              "Cancelled"
            ],
            "type": "string"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "completedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "resultHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiChange": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "changeDate",
          "state",
          "descriptionHtml",
          "externalLink",
          "riskIds",
          "assetIds",
          "createdAt",
          "lastUpdatedAt",
          "allowedActions"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "changeDate": {
            "type": "string",
            "format": "date"
          },
          "state": {
            "enum": [
              "Open",
              "Closed"
            ],
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          },
          "riskIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "assetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "allowedActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApiChangeCreate": {
        "required": [
          "title",
          "changeDate"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "changeDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          },
          "riskIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "assetIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ApiChangeUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "changeDate": {
            "type": "string",
            "format": "date"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ],
            "description": "An absolute `http` or `https` URL of at most 2048 characters. `null` clears the link."
          },
          "state": {
            "enum": [
              "Open",
              "Closed"
            ],
            "type": "string"
          },
          "riskIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the whole set of Risks the Change names; `null` or `[]` clears it."
          },
          "assetIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the whole set of Assets the Change names; `null` or `[]` clears it."
          }
        }
      },
      "ApiCheckCadence": {
        "required": [
          "account",
          "cadence"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "cadence": {
            "enum": [
              "None",
              "EveryMonth",
              "EveryThreeMonths",
              "EverySixMonths",
              "EveryYear",
              "EveryTwoYears"
            ],
            "type": "string"
          }
        }
      },
      "ApiCheckCadenceUpdate": {
        "type": "object",
        "properties": {
          "cadence": {
            "enum": [
              "None",
              "EveryMonth",
              "EveryThreeMonths",
              "EverySixMonths",
              "EveryYear",
              "EveryTwoYears"
            ],
            "type": "string"
          }
        }
      },
      "ApiCheckFoundDocument": {
        "required": [
          "type",
          "label",
          "url"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiCheckFoundVulnerability": {
        "required": [
          "identifier",
          "title",
          "severity",
          "cvssScore",
          "knownExploited",
          "publishedOn",
          "advisoryUrl",
          "affectedAssets"
        ],
        "type": "object",
        "properties": {
          "identifier": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "cvssScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "knownExploited": {
            "type": "boolean"
          },
          "publishedOn": {
            "type": "string",
            "format": "date"
          },
          "advisoryUrl": {
            "type": "string"
          },
          "affectedAssets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCheckRecord"
            }
          }
        }
      },
      "ApiCheckMerge": {
        "required": [
          "leftId",
          "left",
          "rightId",
          "right",
          "survivorId",
          "survivor"
        ],
        "type": "object",
        "properties": {
          "leftId": {
            "type": "string",
            "format": "uuid"
          },
          "left": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCheckRecord"
              }
            ]
          },
          "rightId": {
            "type": "string",
            "format": "uuid"
          },
          "right": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCheckRecord"
              }
            ]
          },
          "survivorId": {
            "type": "string",
            "format": "uuid"
          },
          "survivor": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCheckRecord"
              }
            ]
          }
        }
      },
      "ApiCheckRecord": {
        "required": [
          "type",
          "id",
          "code",
          "title",
          "url"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiCheckResult": {
        "required": [
          "id",
          "check",
          "checkLabel",
          "checkRunId",
          "problem",
          "suggestedChange",
          "subject",
          "weakRequirements",
          "weakPolicies",
          "merge",
          "split",
          "supplierDocuments",
          "foundVulnerabilities",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "check": {
            "type": "string"
          },
          "checkLabel": {
            "type": "string"
          },
          "checkRunId": {
            "type": "string",
            "format": "uuid"
          },
          "problem": {
            "type": "string"
          },
          "suggestedChange": {
            "type": "string"
          },
          "subject": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCheckRecord"
              }
            ]
          },
          "weakRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCheckWeakRequirement"
            }
          },
          "weakPolicies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCheckWeakPolicy"
            }
          },
          "merge": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCheckMerge"
              }
            ]
          },
          "split": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCheckSplit"
              }
            ]
          },
          "supplierDocuments": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCheckSupplierDocuments"
              }
            ]
          },
          "foundVulnerabilities": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ApiCheckFoundVulnerability"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiCheckRun": {
        "required": [
          "account",
          "id",
          "check",
          "checkLabel",
          "status",
          "unitCount",
          "startedByUserId",
          "startedAt",
          "completedAt",
          "publishedResultCount",
          "url",
          "results"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "check": {
            "type": "string"
          },
          "checkLabel": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "unitCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "startedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "publishedResultCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "url": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCheckResult"
            }
          }
        }
      },
      "ApiChecksInbox": {
        "required": [
          "account",
          "checks",
          "inFlightRunId",
          "items"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCheckState"
            }
          },
          "inFlightRunId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCheckResult"
            }
          }
        }
      },
      "ApiCheckSplit": {
        "required": [
          "titleA",
          "whatBelongsA",
          "titleB",
          "whatBelongsB"
        ],
        "type": "object",
        "properties": {
          "titleA": {
            "type": "string"
          },
          "whatBelongsA": {
            "type": "string"
          },
          "titleB": {
            "type": "string"
          },
          "whatBelongsB": {
            "type": "string"
          }
        }
      },
      "ApiCheckState": {
        "required": [
          "name",
          "label",
          "completed",
          "foundNothing"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "completed": {
            "type": "boolean"
          },
          "foundNothing": {
            "type": "boolean"
          }
        }
      },
      "ApiCheckSupplierDocuments": {
        "required": [
          "found",
          "suggestedWebsite"
        ],
        "type": "object",
        "properties": {
          "found": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCheckFoundDocument"
            }
          },
          "suggestedWebsite": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiCheckWeakPolicy": {
        "required": [
          "policyId",
          "policy",
          "explanation"
        ],
        "type": "object",
        "properties": {
          "policyId": {
            "type": "string",
            "format": "uuid"
          },
          "policy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCheckRecord"
              }
            ]
          },
          "explanation": {
            "type": "string"
          }
        }
      },
      "ApiCheckWeakRequirement": {
        "required": [
          "frameworkId",
          "requirementCode",
          "explanation"
        ],
        "type": "object",
        "properties": {
          "frameworkId": {
            "type": "string"
          },
          "requirementCode": {
            "type": "string"
          },
          "explanation": {
            "type": "string"
          }
        }
      },
      "ApiComment": {
        "required": [
          "id",
          "authorUserId",
          "bodyHtml",
          "bodyText",
          "phrase",
          "createdAt",
          "lastSavedAt"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "authorUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "bodyHtml": {
            "type": "string"
          },
          "bodyText": {
            "type": "string"
          },
          "phrase": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCommentPhrase"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSavedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiCommentCreate": {
        "required": [
          "bodyHtml"
        ],
        "type": "object",
        "properties": {
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "phrase": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCommentPhraseInput"
              }
            ]
          }
        }
      },
      "ApiCommentPhrase": {
        "required": [
          "field",
          "letters",
          "copy"
        ],
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "letters": {
            "type": "string"
          },
          "copy": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiCommentPhraseInput": {
        "type": "object",
        "properties": {
          "field": {
            "type": [
              "null",
              "string"
            ]
          },
          "letters": {
            "type": [
              "null",
              "string"
            ]
          },
          "copy": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiCommentUpdate": {
        "type": "object",
        "properties": {
          "bodyHtml": {
            "type": "string"
          },
          "phrase": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApiCommentPhraseInput"
              }
            ]
          }
        }
      },
      "ApiCompletedReview": {
        "required": [
          "id",
          "code",
          "title",
          "completedAt",
          "completedByUserId",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "completedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiCompletedTask": {
        "required": [
          "id",
          "code",
          "title",
          "completedAt",
          "completedByUserId",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "completedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiContentLanguageSettings": {
        "required": [
          "account",
          "contentLanguage",
          "supportedLanguages"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "contentLanguage": {
            "type": "string"
          },
          "supportedLanguages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApiContentLanguageUpdate": {
        "type": "object",
        "properties": {
          "contentLanguage": {
            "type": "string"
          }
        }
      },
      "ApiContextResponse": {
        "required": [
          "type",
          "id",
          "code",
          "title",
          "url"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiContextReview": {
        "required": [
          "nextDue",
          "optOut",
          "optOutHistory"
        ],
        "type": "object",
        "properties": {
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "optOut": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiReviewOptOutAct"
              }
            ]
          },
          "optOutHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReviewOptOutAct"
            }
          }
        }
      },
      "ApiContinuityPlan": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "scenario",
          "planHtml",
          "ownerKind",
          "ownerId",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "testing",
          "activities"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "scenario": {
            "enum": [
              "RegionLoss",
              "DataCentreLoss",
              "OfficeLoss",
              "KeyPersonLoss",
              "SupplierLoss",
              "Cyberattack",
              "Other"
            ],
            "type": "string"
          },
          "planHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiContinuityPlanReview"
          },
          "testing": {
            "$ref": "#/components/schemas/ApiContinuityPlanTesting"
          },
          "activities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          }
        }
      },
      "ApiContinuityPlanCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "scenario": {
            "enum": [
              "RegionLoss",
              "DataCentreLoss",
              "OfficeLoss",
              "KeyPersonLoss",
              "SupplierLoss",
              "Cyberattack",
              "Other"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "planHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "activityIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiContinuityPlanOptOutRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "act": {
            "enum": [
              "Review"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiContinuityPlanReview": {
        "required": [
          "lastReviewedAt",
          "nextDue",
          "optOut",
          "optOutHistory",
          "count",
          "recent"
        ],
        "type": "object",
        "properties": {
          "lastReviewedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "optOut": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiReviewOptOutAct"
              }
            ]
          },
          "optOutHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReviewOptOutAct"
            }
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCompletedTask"
            }
          }
        }
      },
      "ApiContinuityPlanTesting": {
        "required": [
          "lastTestedAt",
          "nextDue",
          "schedules",
          "count",
          "recent"
        ],
        "type": "object",
        "properties": {
          "lastTestedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "schedules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiContinuityTest"
            }
          }
        }
      },
      "ApiContinuityPlanUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "scenario": {
            "enum": [
              "RegionLoss",
              "DataCentreLoss",
              "OfficeLoss",
              "KeyPersonLoss",
              "SupplierLoss",
              "Cyberattack",
              "Other"
            ],
            "type": "string"
          },
          "planHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the plan."
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `ownerId`; `null` removes the Owner."
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Owner's id; `null` removes it, with `ownerKind` `null`.",
            "format": "uuid"
          },
          "activityIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the Critical Activities the plan covers; `null` or `[]` clears them."
          }
        }
      },
      "ApiContinuityTest": {
        "required": [
          "id",
          "planId",
          "kind",
          "conductedAt",
          "conductedByUserId",
          "outcome",
          "actualRtoMinutes",
          "actualRpoMinutes",
          "notesHtml",
          "linkedIncidentId",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "planId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "enum": [
              "Tabletop",
              "Walkthrough",
              "PartialFailover",
              "FullFailover"
            ],
            "type": "string"
          },
          "conductedAt": {
            "type": "string",
            "format": "date"
          },
          "conductedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "outcome": {
            "enum": [
              "Passed",
              "PassedWithFindings",
              "Failed"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "actualRtoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "actualRpoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "notesHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkedIncidentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiConversation": {
        "required": [
          "account",
          "id",
          "title",
          "url",
          "origin",
          "turnState",
          "shared",
          "closed",
          "model",
          "lastError",
          "splitFromConversationId",
          "createdAt",
          "lastMessageAt"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "turnState": {
            "type": "string"
          },
          "shared": {
            "type": "boolean"
          },
          "closed": {
            "type": "boolean"
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastError": {
            "type": [
              "null",
              "string"
            ]
          },
          "splitFromConversationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiConversationMessage": {
        "required": [
          "id",
          "seq",
          "role",
          "sender",
          "text",
          "attachments",
          "toolActivity",
          "turnState",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "seq": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "role": {
            "type": "string"
          },
          "sender": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiMessageSender"
              }
            ]
          },
          "text": {
            "type": "string"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiMessageAttachment"
            }
          },
          "toolActivity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiToolActivity"
            }
          },
          "turnState": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiConversationMessages": {
        "required": [
          "account",
          "conversationId",
          "turnState",
          "lastError",
          "items"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "turnState": {
            "type": "string"
          },
          "lastError": {
            "type": [
              "null",
              "string"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiConversationMessage"
            }
          }
        }
      },
      "ApiConversationMessageSend": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": [
              "null",
              "string"
            ]
          },
          "pageContext": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiPageContext"
              }
            ]
          },
          "uploadIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "x-upload-target": "conversation"
          }
        }
      },
      "ApiConversationMessageSent": {
        "required": [
          "account",
          "messageId",
          "conversationId",
          "seq",
          "queued"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "seq": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "queued": {
            "type": "boolean"
          }
        }
      },
      "ApiCountriesUpdate": {
        "type": "object",
        "properties": {
          "countries": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApiCountry": {
        "required": [
          "code",
          "name"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ApiCountrySettings": {
        "required": [
          "account",
          "countries",
          "supportedCountries"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "supportedCountries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCountry"
            }
          },
          "sync": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiSubframeworkSync"
              }
            ]
          }
        }
      },
      "ApiCountryWithoutCatalog": {
        "required": [
          "frameworkId",
          "country"
        ],
        "type": "object",
        "properties": {
          "frameworkId": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        }
      },
      "ApiCoverageProposal": {
        "required": [
          "requirementCode",
          "requirementTitle",
          "artifact",
          "strength",
          "paths"
        ],
        "type": "object",
        "properties": {
          "requirementCode": {
            "type": "string"
          },
          "requirementTitle": {
            "type": "string"
          },
          "artifact": {
            "$ref": "#/components/schemas/ApiProposalArtifact"
          },
          "strength": {
            "enum": [
              "Equivalent",
              "Partial",
              "Related"
            ],
            "type": "string"
          },
          "paths": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCoverageProposalPath"
            }
          }
        }
      },
      "ApiCoverageProposalAccept": {
        "required": [
          "proposal"
        ],
        "type": "object",
        "properties": {
          "proposal": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiCoverageProposalKey"
              }
            ]
          }
        }
      },
      "ApiCoverageProposalAcceptMany": {
        "required": [
          "proposals"
        ],
        "type": "object",
        "properties": {
          "proposals": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ApiCoverageProposalKey"
            }
          }
        }
      },
      "ApiCoverageProposalKey": {
        "type": "object",
        "properties": {
          "requirementCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "artifactType": {
            "type": [
              "null",
              "string"
            ]
          },
          "artifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiCoverageProposalPath": {
        "required": [
          "sourceFrameworkId",
          "sourceRequirementCode",
          "hubTopicId",
          "hubTopicTitle",
          "strength"
        ],
        "type": "object",
        "properties": {
          "sourceFrameworkId": {
            "type": "string"
          },
          "sourceRequirementCode": {
            "type": "string"
          },
          "hubTopicId": {
            "type": "string"
          },
          "hubTopicTitle": {
            "type": "string"
          },
          "strength": {
            "enum": [
              "Equivalent",
              "Partial",
              "Related"
            ],
            "type": "string"
          }
        }
      },
      "ApiCriticalActivity": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "name",
          "descriptionHtml",
          "rtoMinutes",
          "rpoMinutes",
          "ownerKind",
          "ownerId",
          "createdAt",
          "lastUpdatedAt",
          "plans"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "rtoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rpoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiActivityPlan"
            }
          }
        }
      },
      "ApiCriticalActivityCreate": {
        "required": [
          "name",
          "rtoMinutes",
          "rpoMinutes"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "rtoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rpoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiCriticalActivityUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "rtoMinutes": {
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rpoMinutes": {
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `ownerId`; `null` removes the Owner."
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Owner's id; `null` removes it, with `ownerKind` `null`.",
            "format": "uuid"
          }
        }
      },
      "ApiCustomer": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "name",
          "descriptionHtml",
          "status",
          "interestedPartyId",
          "securityContacts",
          "createdAt",
          "lastUpdatedAt"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": "string"
          },
          "interestedPartyId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "securityContacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSecurityContact"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiCustomerCreate": {
        "required": [
          "name",
          "securityContacts"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "interestedPartyId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "securityContacts": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ApiSecurityContactInput"
            }
          }
        }
      },
      "ApiCustomerUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "interestedPartyId": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the link to the Interested Party.",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": "string"
          },
          "securityContacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSecurityContactInput"
            }
          }
        }
      },
      "ApiDefaultContentSettings": {
        "required": [
          "account",
          "slots"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiDefaultContentSlot"
            }
          }
        }
      },
      "ApiDefaultContentSlot": {
        "required": [
          "slot",
          "bodyHtml",
          "hasAccountOverride"
        ],
        "type": "object",
        "properties": {
          "slot": {
            "enum": [
              "SupplierReview",
              "SupplierDescription",
              "RiskDescription",
              "IncidentDescription",
              "AssetDescriptionInformation",
              "AssetDescriptionSoftware",
              "AssetDescriptionHardware",
              "AssetDescriptionService",
              "AssetDescriptionPeople",
              "AssetDescriptionFacility",
              "ChangeDescription"
            ],
            "type": "string"
          },
          "bodyHtml": {
            "type": "string"
          },
          "hasAccountOverride": {
            "type": "boolean"
          }
        }
      },
      "ApiDefaultContentSlotInput": {
        "type": "object",
        "properties": {
          "slot": {
            "enum": [
              "SupplierReview",
              "SupplierDescription",
              "RiskDescription",
              "IncidentDescription",
              "AssetDescriptionInformation",
              "AssetDescriptionSoftware",
              "AssetDescriptionHardware",
              "AssetDescriptionService",
              "AssetDescriptionPeople",
              "AssetDescriptionFacility",
              "ChangeDescription"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiDefaultContentUpdate": {
        "type": "object",
        "properties": {
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiDefaultContentSlotInput"
            }
          }
        }
      },
      "ApiDocumentReview": {
        "required": [
          "lastReviewedAt",
          "nextDue",
          "lag",
          "optOut",
          "optOutHistory",
          "completedCount",
          "recentCompleted"
        ],
        "type": "object",
        "properties": {
          "lastReviewedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "lag": {
            "enum": [
              "None",
              "NeverReviewed",
              "EditedSinceLastReview"
            ],
            "type": "string"
          },
          "optOut": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiReviewOptOutAct"
              }
            ]
          },
          "optOutHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReviewOptOutAct"
            }
          },
          "completedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recentCompleted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCompletedReview"
            }
          }
        }
      },
      "ApiEvent": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "kind",
          "title",
          "occurredAt",
          "descriptionHtml",
          "frameworkId",
          "scheduleId",
          "attendees",
          "createdAt",
          "lastUpdatedAt",
          "targets",
          "findings",
          "vulnerabilities",
          "meeting",
          "continuityTest"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "InternalAudit",
              "ExternalAudit",
              "PentestCampaign",
              "ManagementReview",
              "RegulatoryInspection",
              "GapAnalysis",
              "Test",
              "ContinuityTest",
              "Meeting"
            ],
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "frameworkId": {
            "type": [
              "null",
              "string"
            ]
          },
          "scheduleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "attendees": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiEventTarget"
            }
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "vulnerabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "meeting": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "deprecated": true,
                "$ref": "#/components/schemas/ApiEventMeeting"
              }
            ],
            "deprecated": true
          },
          "continuityTest": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiEventContinuityTest"
              }
            ]
          }
        }
      },
      "ApiEventContinuityTest": {
        "required": [
          "planId",
          "exerciseType",
          "outcome",
          "achievedRtoMinutes",
          "achievedRpoMinutes",
          "conductedByUserId",
          "incidentId"
        ],
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "format": "uuid"
          },
          "exerciseType": {
            "enum": [
              "Tabletop",
              "Walkthrough",
              "PartialFailover",
              "FullFailover"
            ],
            "type": "string"
          },
          "outcome": {
            "enum": [
              "Passed",
              "PassedWithFindings",
              "Failed"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "achievedRtoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "achievedRpoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "conductedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "incidentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiEventContinuityTestCreate": {
        "type": "object",
        "properties": {
          "planId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "exerciseType": {
            "enum": [
              "Tabletop",
              "Walkthrough",
              "PartialFailover",
              "FullFailover"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "outcome": {
            "enum": [
              "Passed",
              "PassedWithFindings",
              "Failed"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "achievedRtoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "achievedRpoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "conductedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "incidentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiEventContinuityTestUpdate": {
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "format": "uuid"
          },
          "exerciseType": {
            "enum": [
              "Tabletop",
              "Walkthrough",
              "PartialFailover",
              "FullFailover"
            ],
            "type": "string"
          },
          "outcome": {
            "enum": [
              "Passed",
              "PassedWithFindings",
              "Failed"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "A `Failed` outcome needs a `descriptionHtml` on the Event. `null` clears it."
          },
          "achievedRtoMinutes": {
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "`null` clears it.",
            "format": "int32"
          },
          "achievedRpoMinutes": {
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "`null` clears it.",
            "format": "int32"
          },
          "conductedByUserId": {
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "incidentId": {
            "type": [
              "null",
              "string"
            ],
            "description": "An Incident of the Account; `null` clears it.",
            "format": "uuid"
          }
        }
      },
      "ApiEventCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "InternalAudit",
              "ExternalAudit",
              "PentestCampaign",
              "ManagementReview",
              "RegulatoryInspection",
              "GapAnalysis",
              "Test",
              "ContinuityTest",
              "Meeting"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "occurredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "frameworkId": {
            "type": [
              "null",
              "string"
            ]
          },
          "scheduleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "taskId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "attendees": {
            "type": [
              "null",
              "string"
            ]
          },
          "continuityTest": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiEventContinuityTestCreate"
              }
            ]
          }
        }
      },
      "ApiEventFindingCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "severity": {
            "enum": [
              "Major",
              "Minor",
              "Opportunity"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "raisedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiEventMeeting": {
        "required": [
          "transcriptUrl",
          "captureState"
        ],
        "type": "object",
        "properties": {
          "transcriptUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "captureState": {
            "enum": [
              "Live"
            ],
            "type": [
              "null",
              "string"
            ]
          }
        },
        "deprecated": true
      },
      "ApiEventRef": {
        "required": [
          "id",
          "code",
          "title",
          "kind",
          "occurredAt",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "InternalAudit",
              "ExternalAudit",
              "PentestCampaign",
              "ManagementReview",
              "RegulatoryInspection",
              "GapAnalysis",
              "Test",
              "ContinuityTest",
              "Meeting"
            ],
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiEventTarget": {
        "required": [
          "type",
          "id",
          "code",
          "title",
          "url",
          "selectedByUserId",
          "selectionRationale",
          "selectedAt"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          },
          "selectedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "selectionRationale": {
            "type": [
              "null",
              "string"
            ]
          },
          "selectedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiEventTargetAdd": {
        "required": [
          "type",
          "id"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "selectionRationale": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiEventUpdate": {
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "InternalAudit",
              "ExternalAudit",
              "PentestCampaign",
              "ManagementReview",
              "RegulatoryInspection",
              "GapAnalysis",
              "Test",
              "ContinuityTest",
              "Meeting"
            ],
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "frameworkId": {
            "type": [
              "null",
              "string"
            ],
            "description": "An adopted Framework; `null` clears it. A `GapAnalysis` cannot lose its Framework, and a counted Event keeps its Schedule's."
          },
          "scheduleId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Schedule the Event counts toward; `null` makes it a One-off. A new Schedule without `frameworkId` gives its own.",
            "format": "uuid"
          },
          "attendees": {
            "type": [
              "null",
              "string"
            ],
            "description": "Who was at a Meeting. Anyone who may edit the Event may change it. Refused on every other kind. `null` clears it."
          },
          "continuityTest": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApiEventContinuityTestUpdate"
              }
            ]
          }
        }
      },
      "ApiEventVulnerabilityCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalIdentifier": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "severity": {
            "enum": [
              "Low",
              "Medium",
              "High",
              "Critical"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "cvssScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "source": {
            "enum": [
              "Manual",
              "VendorAdvisory",
              "Scanner",
              "PenTest",
              "BugBounty"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "sourceReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "discoveredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "affectedAssetIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiEvidence": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "description",
          "fileName",
          "contentType",
          "byteSize",
          "sha256",
          "collectedAt",
          "expiresAt",
          "uploadedAt",
          "uploadedByUserId",
          "fileUrl",
          "attachedTo"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "byteSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "sha256": {
            "type": "string"
          },
          "collectedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          },
          "uploadedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "fileUrl": {
            "type": "string"
          },
          "attachedTo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiFileLink"
            }
          }
        }
      },
      "ApiEvidenceCreate": {
        "required": [
          "uploadId",
          "title"
        ],
        "type": "object",
        "properties": {
          "uploadId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid",
            "x-upload-target": "evidence"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "collectedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "attachTo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiFileTargetInput"
              }
            ]
          }
        }
      },
      "ApiEvidenceUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "collectedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the date.",
            "format": "date"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the date.",
            "format": "date"
          }
        }
      },
      "ApiFileLink": {
        "required": [
          "type",
          "id",
          "label",
          "url",
          "linkedAt",
          "linkedByUserId"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "linkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "linkedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ApiFileTargetInput": {
        "required": [
          "type",
          "id"
        ],
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "Policy",
              "Scope",
              "Requirement",
              "Risk",
              "Asset",
              "Person",
              "Supplier",
              "Incident",
              "Vulnerability",
              "Event",
              "Finding",
              "ContinuityPlan",
              "TrainingCompletion",
              "Task",
              "Objective",
              "Kpi",
              "BusinessIssue",
              "Procedure",
              "InterestedParty",
              "PartyRequirement",
              "CriticalActivity",
              "TrainingCourse",
              "OrganisationProfile",
              "Role",
              "Schedule",
              "Opportunity",
              "Customer",
              "Change"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiFinding": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "descriptionHtml",
          "severity",
          "sourceType",
          "sourceId",
          "source",
          "raisedAt",
          "raisedByUserId",
          "dueAt",
          "externalLink",
          "createdAt",
          "lastUpdatedAt",
          "workflowState",
          "isFinished",
          "openChainTask",
          "timeline"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "severity": {
            "enum": [
              "Major",
              "Minor",
              "Opportunity"
            ],
            "type": "string"
          },
          "sourceType": {
            "enum": [
              "Event",
              "Incident",
              "AdHoc"
            ],
            "type": "string"
          },
          "sourceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "source": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiRecordRef"
              }
            ]
          },
          "raisedAt": {
            "type": "string",
            "format": "date"
          },
          "raisedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "workflowState": {
            "enum": [
              "Open",
              "RootCauseInProgress",
              "ActionInProgress",
              "AwaitingEffectivenessCheck",
              "Closed",
              "Rejected"
            ],
            "type": "string"
          },
          "isFinished": {
            "type": "boolean"
          },
          "openChainTask": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiOpenTask"
              }
            ]
          },
          "timeline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiChainTask"
            }
          }
        }
      },
      "ApiFindingCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "severity": {
            "enum": [
              "Major",
              "Minor",
              "Opportunity"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "sourceType": {
            "enum": [
              "Event",
              "Incident",
              "AdHoc"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "sourceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "raisedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiFindingRejectRequest": {
        "required": [
          "reasonHtml"
        ],
        "type": "object",
        "properties": {
          "reasonHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "rejectedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ApiFindingUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "raisedAt": {
            "type": "string",
            "format": "date"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the due date.",
            "format": "date"
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ],
            "description": "An absolute `http` or `https` URL of at most 2048 characters. `null` clears it."
          },
          "severity": {
            "enum": [
              "Major",
              "Minor",
              "Opportunity"
            ],
            "type": "string"
          },
          "sourceType": {
            "enum": [
              "Event",
              "Incident",
              "AdHoc"
            ],
            "type": "string"
          },
          "sourceId": {
            "type": "string",
            "format": "uuid"
          },
          "workflowState": {
            "enum": [
              "Open",
              "RootCauseInProgress",
              "ActionInProgress",
              "AwaitingEffectivenessCheck",
              "Closed",
              "Rejected"
            ],
            "type": "string"
          }
        }
      },
      "ApiFramework": {
        "required": [
          "id",
          "name",
          "frameworkLine",
          "edition",
          "kind",
          "description",
          "parentFrameworkId",
          "country",
          "adopted",
          "requirementCount",
          "url",
          "price",
          "lineHeld"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "frameworkLine": {
            "type": "string"
          },
          "edition": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int16"
          },
          "kind": {
            "enum": [
              "Standard",
              "Regulation"
            ],
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "parentFrameworkId": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "adopted": {
            "type": "boolean"
          },
          "requirementCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "url": {
            "type": "string"
          },
          "price": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiFrameworkPrice"
              }
            ]
          },
          "lineHeld": {
            "type": "boolean"
          }
        }
      },
      "ApiFrameworkDetails": {
        "required": [
          "account",
          "id",
          "name",
          "frameworkLine",
          "edition",
          "kind",
          "description",
          "parentFrameworkId",
          "country",
          "adopted",
          "requirementCount",
          "url",
          "gap",
          "proposedCoverageCount",
          "hasProposals"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "frameworkLine": {
            "type": "string"
          },
          "edition": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int16"
          },
          "kind": {
            "enum": [
              "Standard",
              "Regulation"
            ],
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "parentFrameworkId": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "adopted": {
            "type": "boolean"
          },
          "requirementCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "url": {
            "type": "string"
          },
          "gap": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiGapCounts"
              }
            ]
          },
          "proposedCoverageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasProposals": {
            "type": "boolean"
          }
        }
      },
      "ApiFrameworkLineAdd": {
        "required": [
          "frameworkLine"
        ],
        "type": "object",
        "properties": {
          "frameworkLine": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiFrameworkPrice": {
        "required": [
          "amount",
          "currency",
          "interval",
          "includedUsd"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": "string"
          },
          "interval": {
            "type": [
              "null",
              "string"
            ]
          },
          "includedUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ApiFrameworkStatement": {
        "required": [
          "account",
          "frameworkId",
          "slug",
          "url",
          "language",
          "issuedOn",
          "issuedAt",
          "signer",
          "content"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "frameworkId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "issuedOn": {
            "type": "string",
            "format": "date"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "signer": {
            "$ref": "#/components/schemas/ApiFrameworkStatementSigner"
          },
          "content": {
            "$ref": "#/components/schemas/ApiFrameworkStatementContent"
          }
        }
      },
      "ApiFrameworkStatementContent": {
        "required": [
          "organisation",
          "frameworkName",
          "scopeHtml",
          "groups"
        ],
        "type": "object",
        "properties": {
          "organisation": {
            "type": "string"
          },
          "frameworkName": {
            "type": "string"
          },
          "scopeHtml": {
            "type": "string"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiFrameworkStatementGroup"
            }
          }
        }
      },
      "ApiFrameworkStatementEntry": {
        "required": [
          "code",
          "title",
          "category",
          "state",
          "status",
          "narrativeHtml",
          "justification",
          "records"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "state": {
            "enum": [
              "Applicable",
              "NotYetRecorded",
              "Undecided",
              "Excluded"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "Planned",
              "Implemented",
              "Operating"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "narrativeHtml": {
            "type": "string"
          },
          "justification": {
            "type": "string"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiFrameworkStatementRecords"
            }
          }
        }
      },
      "ApiFrameworkStatementGroup": {
        "required": [
          "name",
          "entries"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiFrameworkStatementEntry"
            }
          }
        }
      },
      "ApiFrameworkStatementRecords": {
        "required": [
          "kind",
          "names"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "Policy",
              "Procedure",
              "Risk",
              "Opportunity",
              "Objective",
              "Kpi",
              "BusinessIssue",
              "InterestedParty",
              "Scope"
            ],
            "type": "string"
          },
          "names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApiFrameworkStatementSigner": {
        "required": [
          "name",
          "jobTitle"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "jobTitle": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiFrameworkStatementUpdate": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          }
        }
      },
      "ApiGapAnalysisStart": {
        "type": "object",
        "properties": {
          "startOver": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "ApiGapCounts": {
        "required": [
          "excluded",
          "undecided",
          "unaddressed",
          "partiallyAddressed",
          "addressed",
          "gaps",
          "total"
        ],
        "type": "object",
        "properties": {
          "excluded": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "undecided": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "unaddressed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "partiallyAddressed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "addressed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "gaps": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiImportCreatedRecord": {
        "required": [
          "kind",
          "id",
          "title",
          "url"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiImportPage": {
        "required": [
          "id",
          "title",
          "parentId",
          "treePosition",
          "creationDate",
          "lastModified",
          "processingStatus",
          "marked",
          "isStructuralSkip",
          "phase1KindProbability",
          "lastError",
          "createdRecords"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "parentId": {
            "type": [
              "null",
              "string"
            ]
          },
          "treePosition": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "creationDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastModified": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "processingStatus": {
            "enum": [
              "Pending",
              "Running",
              "Completed",
              "Failed",
              "Skipped"
            ],
            "type": "string"
          },
          "marked": {
            "type": "boolean"
          },
          "isStructuralSkip": {
            "type": "boolean"
          },
          "phase1KindProbability": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastError": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdRecords": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiImportCreatedRecord"
            }
          }
        }
      },
      "ApiImportPageMark": {
        "required": [
          "marked"
        ],
        "type": "object",
        "properties": {
          "marked": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "ApiImportSession": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "fileName",
          "sourceSystem",
          "status",
          "label",
          "progressPercent",
          "progressMessage",
          "errorMessage",
          "createdAt",
          "createdByUserId",
          "activeRunMode",
          "canStart",
          "canContinue",
          "canRetry",
          "canDelete",
          "pages"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "sourceSystem": {
            "type": "string"
          },
          "status": {
            "enum": [
              "Pending",
              "Preparing",
              "Prepared",
              "Processing",
              "PrepareFailed",
              "Deleting"
            ],
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "progressPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "progressMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "errorMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "activeRunMode": {
            "type": [
              "null",
              "string"
            ]
          },
          "canStart": {
            "type": "boolean"
          },
          "canContinue": {
            "type": "boolean"
          },
          "canRetry": {
            "type": "boolean"
          },
          "canDelete": {
            "type": "boolean"
          },
          "pages": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ApiImportPage"
            }
          }
        }
      },
      "ApiImportSessionCreate": {
        "required": [
          "uploadId"
        ],
        "type": "object",
        "properties": {
          "uploadId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid",
            "x-upload-target": "import"
          }
        }
      },
      "ApiImportSessionStart": {
        "required": [
          "mode"
        ],
        "type": "object",
        "properties": {
          "mode": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiIncident": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "descriptionHtml",
          "severity",
          "state",
          "detectedAt",
          "isPersonalDataBreach",
          "breachConfirmedAt",
          "reportedToAuthorityAt",
          "breachNotificationDeadline",
          "isSignificantIncident",
          "significantIncidentAwareAt",
          "earlyWarningSentAt",
          "notificationSentAt",
          "progressReportSentAt",
          "finalReportSentAt",
          "closedAt",
          "cbwReportDeadline",
          "cbwReportDue",
          "externalLink",
          "createdAt",
          "lastUpdatedAt",
          "allowedActions",
          "canAddAttachments"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "severity": {
            "enum": [
              "Low",
              "Medium",
              "High",
              "Critical"
            ],
            "type": "string"
          },
          "state": {
            "enum": [
              "Open",
              "Closed"
            ],
            "type": "string"
          },
          "detectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isPersonalDataBreach": {
            "type": "boolean"
          },
          "breachConfirmedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reportedToAuthorityAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "breachNotificationDeadline": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isSignificantIncident": {
            "type": "boolean"
          },
          "significantIncidentAwareAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "earlyWarningSentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "notificationSentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "progressReportSentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "finalReportSentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "cbwReportDeadline": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "cbwReportDue": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "allowedActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "canAddAttachments": {
            "type": "boolean"
          }
        }
      },
      "ApiIncidentCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "severity": {
            "enum": [
              "Low",
              "Medium",
              "High",
              "Critical"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "detectedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isPersonalDataBreach": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "breachConfirmedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reportedToAuthorityAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isSignificantIncident": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "significantIncidentAwareAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "earlyWarningSentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "notificationSentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "progressReportSentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "finalReportSentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiIncidentUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "severity": {
            "enum": [
              "Low",
              "Medium",
              "High",
              "Critical"
            ],
            "type": "string"
          },
          "state": {
            "enum": [
              "Open",
              "Closed"
            ],
            "type": "string"
          },
          "detectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isPersonalDataBreach": {
            "type": "boolean"
          },
          "breachConfirmedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the confirmation time.",
            "format": "date-time"
          },
          "reportedToAuthorityAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only on a personal-data breach; not before `breachConfirmedAt` and not in the future. `null` clears it.",
            "format": "date-time"
          },
          "isSignificantIncident": {
            "type": "boolean"
          },
          "significantIncidentAwareAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Required while the Incident is significant. Not before `detectedAt`. Stays when `isSignificantIncident` is set to false. `null` clears it, which answers 422 while the Incident is significant.",
            "format": "date-time"
          },
          "earlyWarningSentAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only on a significant incident; not before `significantIncidentAwareAt` and not on a day after today. `null` clears it.",
            "format": "date-time"
          },
          "notificationSentAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only on a significant incident; not before `significantIncidentAwareAt` and not on a day after today. `null` clears it.",
            "format": "date-time"
          },
          "progressReportSentAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only on a significant incident; not before `significantIncidentAwareAt` and not on a day after today. `null` clears it.",
            "format": "date-time"
          },
          "finalReportSentAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only on a significant incident; not before `significantIncidentAwareAt` and not on a day after today. `null` clears it.",
            "format": "date-time"
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ],
            "description": "An absolute `http` or `https` URL of at most 2048 characters. `null` clears it."
          }
        }
      },
      "ApiInterestedParty": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "name",
          "kind",
          "descriptionHtml",
          "status",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "linkedRequirements",
          "responses",
          "partyRequirements"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "Customer",
              "Regulator",
              "Employee",
              "Investor",
              "Supplier",
              "CertificationBody",
              "Public",
              "Other"
            ],
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiContextReview"
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiContextResponse"
            }
          },
          "partyRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiPartyRequirement"
            }
          }
        }
      },
      "ApiInterestedPartyCreate": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "kind": {
            "enum": [
              "Customer",
              "Regulator",
              "Employee",
              "Investor",
              "Supplier",
              "CertificationBody",
              "Public",
              "Other"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiInterestedPartyUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "Customer",
              "Regulator",
              "Employee",
              "Investor",
              "Supplier",
              "CertificationBody",
              "Public",
              "Other"
            ],
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": "string"
          }
        }
      },
      "ApiInvitationPerson": {
        "required": [
          "personId",
          "fullName",
          "email"
        ],
        "type": "object",
        "properties": {
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "fullName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "ApiInvitationPreview": {
        "required": [
          "account",
          "eligible",
          "skipped"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "eligible": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiInvitationPerson"
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiInvitationSkip"
            }
          }
        }
      },
      "ApiInvitationResult": {
        "required": [
          "account",
          "invited",
          "skipped"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "invited": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiInvitationPerson"
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiInvitationSkip"
            }
          }
        }
      },
      "ApiInvitationSendRequest": {
        "required": [
          "personIds"
        ],
        "type": "object",
        "properties": {
          "personIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ApiInvitationSkip": {
        "required": [
          "personId",
          "fullName",
          "email",
          "reason",
          "reasonText"
        ],
        "type": "object",
        "properties": {
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "fullName": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "reason": {
            "enum": [
              "External",
              "Departed",
              "NoIdentity",
              "AlreadyAccountUser",
              "PendingInvitation",
              "NotFound",
              "SendFailed"
            ],
            "type": "string"
          },
          "reasonText": {
            "type": "string"
          }
        }
      },
      "ApiKpi": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "descriptionHtml",
          "ownerKind",
          "ownerId",
          "archivedAt",
          "createdAt",
          "lastUpdatedAt",
          "measurement",
          "measuredObjectives",
          "linkedRequirements",
          "arisesFromBusinessIssues",
          "arisesFromInterestedParties"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "measurement": {
            "$ref": "#/components/schemas/ApiKpiMeasurement"
          },
          "measuredObjectives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          },
          "arisesFromBusinessIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "arisesFromInterestedParties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          }
        }
      },
      "ApiKpiCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "measurementOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiKpiMeasurement": {
        "required": [
          "lastMeasuredAt",
          "nextDue",
          "optOut",
          "optOutHistory"
        ],
        "type": "object",
        "properties": {
          "lastMeasuredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "optOut": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiReviewOptOutAct"
              }
            ]
          },
          "optOutHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReviewOptOutAct"
            }
          }
        }
      },
      "ApiKpiUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `ownerId`; `null` removes the Owner."
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Owner's id; `null` removes it, with `ownerKind` `null`.",
            "format": "uuid"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only the current value is accepted: Archive and Unarchive move it, so `null` passes only for a Kpi that is not archived.",
            "format": "date-time"
          }
        }
      },
      "ApiLibraryCourse": {
        "required": [
          "slug",
          "version",
          "title",
          "description",
          "category",
          "lessonCount",
          "questionCount",
          "passMarkPercent"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "enum": [
              "SecurityAwareness",
              "Phishing",
              "Privacy",
              "RoleSpecific",
              "Onboarding",
              "ContinuousLearning"
            ],
            "type": "string"
          },
          "lessonCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "questionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "passMarkPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiLibraryCourseDetails": {
        "required": [
          "account",
          "slug",
          "version",
          "title",
          "description",
          "category",
          "lessonCount",
          "questionCount",
          "passMarkPercent",
          "lessons"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "slug": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "enum": [
              "SecurityAwareness",
              "Phishing",
              "Privacy",
              "RoleSpecific",
              "Onboarding",
              "ContinuousLearning"
            ],
            "type": "string"
          },
          "lessonCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "questionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "passMarkPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lessons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLibraryLesson"
            }
          }
        }
      },
      "ApiLibraryLesson": {
        "required": [
          "key",
          "title",
          "bodyHtml"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "bodyHtml": {
            "type": "string"
          }
        }
      },
      "ApiLicense": {
        "required": [
          "account",
          "product",
          "kind",
          "validFrom",
          "validTo",
          "frameworkLines",
          "allowance"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "product": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "validFrom": {
            "type": "string",
            "format": "date-time"
          },
          "validTo": {
            "type": "string",
            "format": "date-time"
          },
          "frameworkLines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowance": {
            "$ref": "#/components/schemas/ApiAssistantAllowance"
          }
        }
      },
      "ApiLicenseCancellation": {
        "required": [
          "account",
          "outcome",
          "accessUntil"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "outcome": {
            "type": "string"
          },
          "accessUntil": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ApiLinkedRequirement": {
        "required": [
          "frameworkId",
          "requirementCode",
          "title",
          "isMandatory"
        ],
        "type": "object",
        "properties": {
          "frameworkId": {
            "type": "string"
          },
          "requirementCode": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "isMandatory": {
            "type": "boolean"
          }
        }
      },
      "ApiLinkRequirementsRequest": {
        "required": [
          "requirements"
        ],
        "type": "object",
        "properties": {
          "requirements": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ApiRequirementKey"
            }
          }
        }
      },
      "ApiLinkResponsesRequest": {
        "required": [
          "responses"
        ],
        "type": "object",
        "properties": {
          "responses": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ApiResponseKey"
            }
          }
        }
      },
      "ApiListOfApiAccountListItem": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiAccountListItem"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiComment": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiComment"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiConversation": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiConversation"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiCoverageProposal": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCoverageProposal"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiEventTarget": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiEventTarget"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiFramework": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiFramework"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiImportSession": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiImportSession"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiLibraryCourse": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLibraryCourse"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiNotification": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiNotification"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiPartyRequirement": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiPartyRequirement"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiRequirementRow": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRequirementRow"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiSupplierReview": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSupplierReview"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfApiTreatmentAction": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTreatmentAction"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiListOfIReadOnlyDictionaryOfstringAndObject": {
        "required": [
          "account",
          "items",
          "total",
          "nextOffset"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiMessageAttachment": {
        "required": [
          "id",
          "fileName",
          "contentType"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          }
        }
      },
      "ApiMessageSender": {
        "required": [
          "userId",
          "personId",
          "name"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "personId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiNextOccurrence": {
        "required": [
          "dueAt",
          "openTask"
        ],
        "type": "object",
        "properties": {
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "openTask": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiOpenTask"
              }
            ]
          }
        }
      },
      "ApiNotification": {
        "required": [
          "id",
          "commentId",
          "mentioned",
          "readAt",
          "createdAt",
          "authorUserId",
          "record",
          "phraseField",
          "bodyHtml",
          "bodyText",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "commentId": {
            "type": "string",
            "format": "uuid"
          },
          "mentioned": {
            "type": "boolean"
          },
          "readAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "authorUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "record": {
            "$ref": "#/components/schemas/ApiNotificationRecord"
          },
          "phraseField": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyHtml": {
            "type": "string"
          },
          "bodyText": {
            "type": "string"
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiNotificationMarkRead": {
        "required": [
          "commentId"
        ],
        "type": "object",
        "properties": {
          "commentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiNotificationRecord": {
        "required": [
          "type",
          "id",
          "code",
          "title",
          "url"
        ],
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "Policy",
              "Scope",
              "Requirement",
              "Risk",
              "Asset",
              "Person",
              "Supplier",
              "Incident",
              "Vulnerability",
              "Event",
              "Finding",
              "ContinuityPlan",
              "TrainingCompletion",
              "Task",
              "Objective",
              "Kpi",
              "BusinessIssue",
              "Procedure",
              "InterestedParty",
              "PartyRequirement",
              "CriticalActivity",
              "TrainingCourse",
              "OrganisationProfile",
              "Role",
              "Schedule",
              "Opportunity",
              "Customer",
              "Change"
            ],
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiObjective": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "descriptionHtml",
          "planHtml",
          "ownerKind",
          "ownerId",
          "targetDate",
          "status",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "kpis",
          "opportunities",
          "linkedRequirements",
          "arisesFromBusinessIssues",
          "arisesFromInterestedParties"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "planHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "targetDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "status": {
            "enum": [
              "Active",
              "Achieved",
              "Abandoned"
            ],
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiPlanningReview"
          },
          "kpis": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "opportunities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          },
          "arisesFromBusinessIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "arisesFromInterestedParties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          }
        }
      },
      "ApiObjectiveCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "planHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "targetDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiObjectiveUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "planHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the plan."
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `ownerId`; `null` removes the Owner."
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Owner's id; `null` removes it, with `ownerKind` `null`.",
            "format": "uuid"
          },
          "targetDate": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the target date.",
            "format": "date"
          },
          "status": {
            "enum": [
              "Active",
              "Achieved",
              "Abandoned"
            ],
            "type": "string"
          },
          "kpiIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the Kpis that measure the Objective; `null` or `[]` clears them."
          }
        }
      },
      "ApiOpenTask": {
        "required": [
          "id",
          "code",
          "title",
          "dueAt",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiOpportunity": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "descriptionHtml",
          "category",
          "ownerKind",
          "ownerId",
          "status",
          "identifiedAt",
          "archivedAt",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "objectives",
          "linkedRequirements",
          "arisesFromBusinessIssues",
          "arisesFromInterestedParties"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": "string"
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": "string"
          },
          "identifiedAt": {
            "type": "string",
            "format": "date"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiContextReview"
          },
          "objectives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          },
          "arisesFromBusinessIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "arisesFromInterestedParties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          }
        }
      },
      "ApiOpportunityCreate": {
        "required": [
          "title",
          "descriptionHtml"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "identifiedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiOpportunityUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": "string"
          },
          "category": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the category."
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `ownerId`; `null` removes the Owner."
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Owner's id; `null` removes it, with `ownerKind` `null`.",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Active",
              "Archived"
            ],
            "type": "string"
          },
          "identifiedAt": {
            "type": "string",
            "format": "date"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only corrects the date of an archived Opportunity; `null` passes only for an Opportunity that is not archived.",
            "format": "date"
          },
          "objectiveIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the Objectives the Opportunity names; `null` or `[]` clears them."
          }
        }
      },
      "ApiOrganisationProfile": {
        "required": [
          "account",
          "id",
          "url",
          "bodyHtml",
          "lastUpdatedByUserId",
          "lastUpdatedAt",
          "maxCharacters"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "bodyHtml": {
            "type": "string"
          },
          "lastUpdatedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "lastUpdatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "maxCharacters": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiOrganisationProfileUpdate": {
        "type": "object",
        "properties": {
          "bodyHtml": {
            "type": "string"
          }
        }
      },
      "ApiPageContext": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "id": {
            "type": [
              "null",
              "string"
            ]
          },
          "label": {
            "type": [
              "null",
              "string"
            ]
          },
          "route": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiPartyRequirement": {
        "required": [
          "id",
          "requirementHtml",
          "source",
          "isMandatory",
          "createdAt",
          "lastUpdatedAt"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "requirementHtml": {
            "type": "string"
          },
          "source": {
            "type": [
              "null",
              "string"
            ]
          },
          "isMandatory": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiPartyRequirementCreate": {
        "required": [
          "requirementHtml"
        ],
        "type": "object",
        "properties": {
          "requirementHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "type": [
              "null",
              "string"
            ]
          },
          "isMandatory": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "ApiPartyRequirementUpdate": {
        "type": "object",
        "properties": {
          "requirementHtml": {
            "type": "string"
          },
          "source": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the source."
          },
          "isMandatory": {
            "type": "boolean"
          }
        }
      },
      "ApiPerson": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "fullName",
          "affiliation",
          "jobTitle",
          "department",
          "manager",
          "status",
          "startedAt",
          "endedAt",
          "isDeparted",
          "notesHtml",
          "createdAt",
          "lastUpdatedAt",
          "identities",
          "roles",
          "openTasks",
          "access"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "affiliation": {
            "enum": [
              "Employee",
              "Contractor",
              "Intern",
              "Board",
              "External"
            ],
            "type": "string"
          },
          "jobTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "department": {
            "type": [
              "null",
              "string"
            ]
          },
          "manager": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiRecordRef"
              }
            ]
          },
          "status": {
            "enum": [
              "Pending",
              "Active",
              "OnLeave",
              "Departed"
            ],
            "type": "string"
          },
          "startedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "endedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "isDeparted": {
            "type": "boolean"
          },
          "notesHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "identities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiPersonIdentity"
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "openTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiOpenTask"
            }
          },
          "access": {
            "description": "What the Person can reach, the same as the Permissions tab of their Details page. Only the single get, create, update and lifecycle answers carry it, not the list.",
            "$ref": "#/components/schemas/ApiPersonAccess"
          }
        }
      },
      "ApiPersonAccess": {
        "required": [
          "status",
          "pages"
        ],
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "NoLogin",
              "AccountOwner",
              "Member"
            ],
            "type": "string",
            "description": "`Member` signs in with Permissions that `pages` lists, `AccountOwner` can see and change everything, `NoLogin` has no login and so reaches nothing."
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiPersonPageAccess"
            },
            "description": "Every page a `Member` can reach, in the order of the Dock. A page the Person cannot reach is left out. Empty for `AccountOwner` and `NoLogin`."
          }
        }
      },
      "ApiPersonCreate": {
        "required": [
          "fullName"
        ],
        "type": "object",
        "properties": {
          "fullName": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "affiliation": {
            "enum": [
              "Employee",
              "Contractor",
              "Intern",
              "Board",
              "External"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "jobTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "department": {
            "type": [
              "null",
              "string"
            ]
          },
          "managerPersonId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Pending",
              "Active",
              "OnLeave",
              "Departed"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "startedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "endedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "notesHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "roleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ApiPersonDepartRequest": {
        "type": "object",
        "properties": {
          "endedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "successorPersonId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ownedAssetIdsToReturn": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ApiPersonIdentity": {
        "required": [
          "id",
          "email",
          "userId",
          "isPrimary"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "userId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "isPrimary": {
            "type": "boolean"
          }
        }
      },
      "ApiPersonIdentityCreate": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkedUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ApiPersonMergeRequest": {
        "required": [
          "intoPersonId"
        ],
        "type": "object",
        "properties": {
          "intoPersonId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "fullName": {
            "type": [
              "null",
              "string"
            ]
          },
          "affiliation": {
            "enum": [
              "Employee",
              "Contractor",
              "Intern",
              "Board",
              "External"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "jobTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "department": {
            "type": [
              "null",
              "string"
            ]
          },
          "managerPersonId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "primaryIdentityId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiPersonPageAccess": {
        "required": [
          "page",
          "section",
          "access",
          "from"
        ],
        "type": "object",
        "properties": {
          "page": {
            "type": "string",
            "description": "The page address as a person types it (`/Risks`)."
          },
          "section": {
            "type": "string",
            "description": "The Dock section the page sits under, named in the language of the request."
          },
          "access": {
            "enum": [
              "Edit",
              "Read",
              "OwnRecords",
              "EveryMember"
            ],
            "type": "string",
            "description": "`Edit` reads and changes records, `Read` reads them, `OwnRecords` reads only the records the Person owns or is assigned, and `EveryMember` is a page every member opens."
          },
          "from": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            },
            "description": "The Roles that give this access, empty for `OwnRecords` and `EveryMember`."
          }
        }
      },
      "ApiPersonUpdate": {
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string"
          },
          "affiliation": {
            "enum": [
              "Employee",
              "Contractor",
              "Intern",
              "Board",
              "External"
            ],
            "type": "string"
          },
          "jobTitle": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the job title."
          },
          "department": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the department."
          },
          "managerPersonId": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the manager.",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Pending",
              "Active",
              "OnLeave",
              "Departed"
            ],
            "type": "string"
          },
          "startedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the start date.",
            "format": "date"
          },
          "endedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only corrects the departure date of a Departed Person; `null` passes only for a Person who has not departed.",
            "format": "date"
          },
          "notesHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the notes."
          },
          "roleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Every Role the Person holds, replacing the set they hold; `[]` or `null` removes them all."
          },
          "confirmVacancy": {
            "type": "boolean"
          }
        }
      },
      "ApiPlanningReview": {
        "required": [
          "lastReviewedAt",
          "nextDue",
          "optOut",
          "optOutHistory"
        ],
        "type": "object",
        "properties": {
          "lastReviewedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "optOut": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiReviewOptOutAct"
              }
            ]
          },
          "optOutHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReviewOptOutAct"
            }
          }
        }
      },
      "ApiPolicy": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "bodyHtml",
          "ownerKind",
          "ownerId",
          "archivedAt",
          "lastWordChangedAt",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "approvalAudiencePersonIds",
          "approvalAudienceRoleIds",
          "awarenessAudienceKind",
          "awarenessAudienceRoleIds",
          "approval",
          "awareness",
          "linkedRequirements",
          "arisesFromBusinessIssues",
          "arisesFromInterestedParties",
          "procedureIds",
          "procedures"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "bodyHtml": {
            "type": "string"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastWordChangedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiDocumentReview"
          },
          "approvalAudiencePersonIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "approvalAudienceRoleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "awarenessAudienceKind": {
            "enum": [
              "Everyone",
              "TheseRoles"
            ],
            "type": "string"
          },
          "awarenessAudienceRoleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "approval": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAttestation"
              }
            ]
          },
          "awareness": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAttestation"
              }
            ]
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          },
          "arisesFromBusinessIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "arisesFromInterestedParties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "procedureIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "procedures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          }
        }
      },
      "ApiPolicyCreate": {
        "required": [
          "title",
          "bodyHtml"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "approvalAudiencePersonIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "approvalAudienceRoleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "awarenessAudienceKind": {
            "enum": [
              "Everyone",
              "TheseRoles"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "awarenessAudienceRoleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiPolicyUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "bodyHtml": {
            "type": "string"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only the current value passes; a change answers 422 naming the action, so `null` passes only for a Policy that is not archived.",
            "format": "date-time"
          },
          "approvalAudiencePersonIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the Persons to Approve; the audience names Persons or Roles, never both. `null` or `[]` empties the list."
          },
          "approvalAudienceRoleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the Roles to Approve. `null` or `[]` empties the list."
          },
          "awarenessAudienceKind": {
            "enum": [
              "Everyone",
              "TheseRoles"
            ],
            "type": "string"
          },
          "awarenessAudienceRoleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the Roles in the Awareness audience. `null` or `[]` empties the list."
          },
          "procedureIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the Procedures that implement this Policy. `null` or `[]` clears them."
          }
        }
      },
      "ApiProcedure": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "bodyHtml",
          "ownerKind",
          "ownerId",
          "archivedAt",
          "lastWordChangedAt",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "awarenessAudienceKind",
          "awarenessAudienceRoleIds",
          "awareness",
          "linkedRequirements",
          "policyIds",
          "policies"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "bodyHtml": {
            "type": "string"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastWordChangedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiDocumentReview"
          },
          "awarenessAudienceKind": {
            "enum": [
              "Everyone",
              "TheseRoles"
            ],
            "type": "string"
          },
          "awarenessAudienceRoleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "awareness": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAttestation"
              }
            ]
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          },
          "policyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "policies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          }
        }
      },
      "ApiProcedureCreate": {
        "required": [
          "title",
          "bodyHtml"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "awarenessAudienceKind": {
            "enum": [
              "Everyone",
              "TheseRoles"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "awarenessAudienceRoleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiProcedureUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "bodyHtml": {
            "type": "string"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only the current value passes; a change answers 422 naming the action, so `null` passes only for a Procedure that is not archived.",
            "format": "date-time"
          },
          "awarenessAudienceKind": {
            "enum": [
              "Everyone",
              "TheseRoles"
            ],
            "type": "string"
          },
          "awarenessAudienceRoleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the Roles in the Awareness audience. `null` or `[]` empties the list."
          },
          "policyIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the Policies this Procedure implements. `null` or `[]` clears them."
          }
        }
      },
      "ApiProposalArtifact": {
        "required": [
          "type",
          "id",
          "code",
          "title",
          "url"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiRecordRef": {
        "required": [
          "id",
          "code",
          "title",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiRequirement": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "frameworkId",
          "title",
          "body",
          "category",
          "isMandatory",
          "applicable",
          "exclusionJustification",
          "ownerKind",
          "ownerId",
          "status",
          "narrativeHtml",
          "gapState",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "coverage"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "frameworkId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "isMandatory": {
            "type": "boolean"
          },
          "applicable": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "exclusionJustification": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Planned",
              "Implemented",
              "Operating"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "narrativeHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "gapState": {
            "enum": [
              "Excluded",
              "Undecided",
              "Unaddressed",
              "PartiallyAddressed",
              "Addressed"
            ],
            "type": "string"
          },
          "createdAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiRequirementReview"
          },
          "coverage": {
            "$ref": "#/components/schemas/ApiRequirementCoverage"
          }
        }
      },
      "ApiRequirementApplicability": {
        "type": "object",
        "properties": {
          "applicable": {
            "type": "boolean"
          },
          "justification": {
            "type": "string"
          }
        }
      },
      "ApiRequirementCoverage": {
        "required": [
          "policies",
          "procedures",
          "scope",
          "risks",
          "objectives",
          "kpis",
          "businessIssues",
          "interestedParties",
          "opportunities",
          "trainingCourses"
        ],
        "type": "object",
        "properties": {
          "policies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "procedures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "scope": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiScopeCoverage"
              }
            ]
          },
          "risks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "objectives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "kpis": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "businessIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "interestedParties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "opportunities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "trainingCourses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          }
        }
      },
      "ApiRequirementKey": {
        "type": "object",
        "properties": {
          "frameworkId": {
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiRequirementReview": {
        "required": [
          "lastReviewedAt",
          "nextDue",
          "optOut",
          "optOutHistory",
          "count",
          "recent"
        ],
        "type": "object",
        "properties": {
          "lastReviewedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "optOut": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiReviewOptOutAct"
              }
            ]
          },
          "optOutHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReviewOptOutAct"
            }
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCompletedTask"
            }
          }
        }
      },
      "ApiRequirementRow": {
        "required": [
          "id",
          "code",
          "url",
          "frameworkId",
          "title",
          "category",
          "isMandatory",
          "applicable",
          "exclusionJustification",
          "ownerKind",
          "ownerId",
          "status",
          "gapState"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "frameworkId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "isMandatory": {
            "type": "boolean"
          },
          "applicable": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "exclusionJustification": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Planned",
              "Implemented",
              "Operating"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "gapState": {
            "enum": [
              "Excluded",
              "Undecided",
              "Unaddressed",
              "PartiallyAddressed",
              "Addressed"
            ],
            "type": "string"
          }
        }
      },
      "ApiRequirementUpdate": {
        "type": "object",
        "properties": {
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "Planned",
              "Implemented",
              "Operating"
            ],
            "type": "string"
          },
          "narrativeHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the narrative."
          }
        }
      },
      "ApiResponseKey": {
        "required": [
          "type",
          "id"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiReviewOptOutAct": {
        "required": [
          "kind",
          "reason",
          "actorUserId",
          "occurredAt"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "actorUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiReviewOptOutRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiRisk": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "descriptionHtml",
          "category",
          "ownerKind",
          "ownerId",
          "inherentLikelihood",
          "inherentImpact",
          "residualLikelihood",
          "residualImpact",
          "status",
          "identifiedAt",
          "closedAt",
          "acceptedAt",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "linkedRequirements",
          "arisesFromBusinessIssues",
          "arisesFromInterestedParties",
          "assets",
          "suppliers",
          "treatmentActions",
          "showsResidualRevisitBanner"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": "string"
          },
          "category": {
            "enum": [
              "Compliance",
              "Financial",
              "Operational",
              "People",
              "Reputational",
              "Supplier",
              "Technological",
              "Other"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "inherentLikelihood": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int16"
          },
          "inherentImpact": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int16"
          },
          "residualLikelihood": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int16"
          },
          "residualImpact": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int16"
          },
          "status": {
            "enum": [
              "Open",
              "Treating",
              "Mitigated",
              "Accepted",
              "Closed"
            ],
            "type": "string"
          },
          "identifiedAt": {
            "type": "string",
            "format": "date"
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "acceptedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiRiskReview"
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          },
          "arisesFromBusinessIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "arisesFromInterestedParties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "suppliers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "treatmentActions": {
            "$ref": "#/components/schemas/ApiRiskTreatmentActions"
          },
          "showsResidualRevisitBanner": {
            "type": "boolean"
          }
        }
      },
      "ApiRiskCreate": {
        "required": [
          "title",
          "inherentLikelihood",
          "inherentImpact"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "enum": [
              "Compliance",
              "Financial",
              "Operational",
              "People",
              "Reputational",
              "Supplier",
              "Technological",
              "Other"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "inherentLikelihood": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inherentImpact": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "residualLikelihood": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "residualImpact": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "status": {
            "enum": [
              "Open",
              "Treating",
              "Mitigated",
              "Accepted",
              "Closed"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "identifiedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "acceptedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "assetIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "supplierIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ApiRiskReview": {
        "required": [
          "nextDue",
          "optOut",
          "optOutHistory",
          "completedCount",
          "recentCompleted"
        ],
        "type": "object",
        "properties": {
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "optOut": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiReviewOptOutAct"
              }
            ]
          },
          "optOutHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReviewOptOutAct"
            }
          },
          "completedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recentCompleted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCompletedReview"
            }
          }
        }
      },
      "ApiRiskTreatmentActions": {
        "required": [
          "open",
          "done",
          "cancelled",
          "items"
        ],
        "type": "object",
        "properties": {
          "open": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "done": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cancelled": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTreatmentAction"
            }
          }
        }
      },
      "ApiRiskUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "category": {
            "enum": [
              "Compliance",
              "Financial",
              "Operational",
              "People",
              "Reputational",
              "Supplier",
              "Technological",
              "Other"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the category."
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `ownerId`; `null` removes the Owner."
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Owner's id; `null` removes it, with `ownerKind` `null`.",
            "format": "uuid"
          },
          "inherentLikelihood": {
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inherentImpact": {
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "residualLikelihood": {
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "`null` clears the residual score; `Mitigated` needs both residual scores.",
            "format": "int32"
          },
          "residualImpact": {
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "`null` clears the residual score; `Mitigated` needs both residual scores.",
            "format": "int32"
          },
          "status": {
            "enum": [
              "Open",
              "Treating",
              "Mitigated",
              "Accepted",
              "Closed"
            ],
            "type": "string",
            "description": "Only `Open`, `Treating`, and `Mitigated` move here."
          },
          "identifiedAt": {
            "type": "string",
            "format": "date"
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Corrects the closure date of a Closed Risk; `null` is refused on a Closed Risk and does nothing on another.",
            "format": "date"
          },
          "acceptedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Corrects the Accepted-on date of an Accepted Risk; `null` is refused on an Accepted Risk and does nothing on another.",
            "format": "date"
          },
          "assetIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the whole set of Assets the Risk names; `null` or `[]` clears it."
          },
          "supplierIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the whole set of Suppliers the Risk names; `null` or `[]` clears it."
          }
        }
      },
      "ApiRole": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "name",
          "descriptionHtml",
          "competenciesHtml",
          "screeningHtml",
          "createdAt",
          "lastUpdatedAt",
          "holders",
          "holdings",
          "trainingCourses",
          "permissions"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "competenciesHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "screeningHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "holders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "holdings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRoleHolding"
            }
          },
          "trainingCourses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "permissions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "What the Role gives, by page address as a person types it (`/Risks`) with the level `Read` or `Edit`. A page the Role gives nothing on is left out."
          }
        }
      },
      "ApiRoleCreate": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "competenciesHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "screeningHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "permissions": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            },
            "description": "Page address as a person types it (`/Risks`) to the level `None`, `Read` or `Edit`. Left out, the Role is created with no Permissions."
          }
        }
      },
      "ApiRoleHolderCreate": {
        "required": [
          "personId"
        ],
        "type": "object",
        "properties": {
          "personId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiRoleHolding": {
        "required": [
          "register",
          "kind",
          "id",
          "code",
          "title",
          "field",
          "url"
        ],
        "type": "object",
        "properties": {
          "register": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiRoleUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "competenciesHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the competencies."
          },
          "screeningHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the screening."
          },
          "permissions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Page address as a person types it (`/Risks`) to the level `None`, `Read` or `Edit`. Only the pages named change; `None` removes the Role's Permission on that page. Cannot be `null`."
          }
        }
      },
      "ApiSchedule": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "descriptionHtml",
          "kind",
          "origin",
          "frameworkId",
          "frameworkName",
          "continuityPlanId",
          "ownerKind",
          "ownerId",
          "cadence",
          "createdAt",
          "lastUpdatedAt",
          "nextOccurrence",
          "events"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "kind": {
            "enum": [
              "InternalAudit",
              "ExternalAudit",
              "ManagementReview",
              "GapAnalysis",
              "RegulatoryInspection",
              "Test",
              "ContinuityTest",
              "Meeting"
            ],
            "type": "string"
          },
          "origin": {
            "enum": [
              "SystemMade",
              "MemberMade"
            ],
            "type": "string"
          },
          "frameworkId": {
            "type": [
              "null",
              "string"
            ]
          },
          "frameworkName": {
            "type": [
              "null",
              "string"
            ]
          },
          "continuityPlanId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "cadence": {
            "enum": [
              "None",
              "EveryMonth",
              "EveryThreeMonths",
              "EverySixMonths",
              "EveryYear",
              "EveryTwoYears"
            ],
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nextOccurrence": {
            "$ref": "#/components/schemas/ApiNextOccurrence"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiEventRef"
            }
          }
        }
      },
      "ApiScheduleCreate": {
        "required": [
          "kind",
          "title"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "InternalAudit",
              "ExternalAudit",
              "ManagementReview",
              "GapAnalysis",
              "RegulatoryInspection",
              "Test",
              "ContinuityTest",
              "Meeting"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "frameworkId": {
            "type": [
              "null",
              "string"
            ]
          },
          "continuityPlanId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "cadence": {
            "enum": [
              "None",
              "EveryMonth",
              "EveryThreeMonths",
              "EverySixMonths",
              "EveryYear",
              "EveryTwoYears"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiScheduleUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "Sanitized; `null` or a blank value clears it. A system-made Schedule takes it too."
          },
          "cadence": {
            "enum": [
              "None",
              "EveryMonth",
              "EveryThreeMonths",
              "EverySixMonths",
              "EveryYear",
              "EveryTwoYears"
            ],
            "type": "string"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "enum": [
              "InternalAudit",
              "ExternalAudit",
              "ManagementReview",
              "GapAnalysis",
              "RegulatoryInspection",
              "Test",
              "ContinuityTest",
              "Meeting"
            ],
            "type": "string"
          },
          "frameworkId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Fixed: a different Framework answers 422. `null` passes only for a Schedule that has no Framework pin."
          },
          "continuityPlanId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Fixed: a different Continuity Plan answers 422. `null` passes only for a Schedule that has no Continuity Plan pin.",
            "format": "uuid"
          }
        }
      },
      "ApiScope": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "bodyHtml",
          "ownerKind",
          "ownerId",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "linkedRequirements"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "bodyHtml": {
            "type": "string"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiDocumentReview"
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          }
        }
      },
      "ApiScopeCoverage": {
        "required": [
          "title",
          "url"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiScopeUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "Rich text; `null` clears it to empty."
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRequirementKey"
            }
          }
        }
      },
      "ApiSecurityContact": {
        "required": [
          "email",
          "name"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiSecurityContactInput": {
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiSubframeworkSync": {
        "required": [
          "adoptedFrameworks",
          "unadoptedFrameworks",
          "countriesWithoutCatalog"
        ],
        "type": "object",
        "properties": {
          "adoptedFrameworks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unadoptedFrameworks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "countriesWithoutCatalog": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiCountryWithoutCatalog"
            }
          }
        }
      },
      "ApiSupplier": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "name",
          "descriptionHtml",
          "category",
          "criticality",
          "status",
          "country",
          "website",
          "processesPersonalData",
          "relationshipOwnerKind",
          "relationshipOwnerId",
          "terminatedAt",
          "createdAt",
          "lastUpdatedAt",
          "review",
          "ownedAssets",
          "risks"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "enum": [
              "Hosting",
              "SaaS",
              "SubProcessor",
              "Professional",
              "Hardware",
              "Other"
            ],
            "type": "string"
          },
          "criticality": {
            "enum": [
              "Critical",
              "Important",
              "LowRisk"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "Onboarding",
              "Active",
              "UnderReview",
              "Terminating",
              "Terminated"
            ],
            "type": "string"
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "website": {
            "type": [
              "null",
              "string"
            ]
          },
          "processesPersonalData": {
            "type": "boolean"
          },
          "relationshipOwnerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "relationshipOwnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "terminatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/ApiSupplierReviewState"
          },
          "ownedAssets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "risks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          }
        }
      },
      "ApiSupplierCreate": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "enum": [
              "Hosting",
              "SaaS",
              "SubProcessor",
              "Professional",
              "Hardware",
              "Other"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "criticality": {
            "enum": [
              "Critical",
              "Important",
              "LowRisk"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "enum": [
              "Onboarding",
              "Active",
              "UnderReview",
              "Terminating",
              "Terminated"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "website": {
            "type": [
              "null",
              "string"
            ]
          },
          "processesPersonalData": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "relationshipOwnerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "relationshipOwnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "terminatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "reviewOptOutReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiSupplierReview": {
        "required": [
          "id",
          "supplierId",
          "reviewedAt",
          "reviewedByUserId",
          "outcome",
          "bodyHtml",
          "nextReviewDueAt",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "supplierId": {
            "type": "string",
            "format": "uuid"
          },
          "reviewedAt": {
            "type": "string",
            "format": "date"
          },
          "reviewedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "outcome": {
            "enum": [
              "Continue",
              "ContinueWithConditions",
              "Terminate"
            ],
            "type": "string"
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "nextReviewDueAt": {
            "type": "string",
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiSupplierReviewCadence": {
        "required": [
          "criticality",
          "cadence"
        ],
        "type": "object",
        "properties": {
          "criticality": {
            "enum": [
              "Critical",
              "Important",
              "LowRisk"
            ],
            "type": "string"
          },
          "cadence": {
            "enum": [
              "None",
              "EveryMonth",
              "EveryThreeMonths",
              "EverySixMonths",
              "EveryYear",
              "EveryTwoYears"
            ],
            "type": "string"
          }
        }
      },
      "ApiSupplierReviewCadenceInput": {
        "type": "object",
        "properties": {
          "criticality": {
            "enum": [
              "Critical",
              "Important",
              "LowRisk"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "cadence": {
            "enum": [
              "None",
              "EveryMonth",
              "EveryThreeMonths",
              "EverySixMonths",
              "EveryYear",
              "EveryTwoYears"
            ],
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiSupplierReviewCreate": {
        "required": [
          "outcome"
        ],
        "type": "object",
        "properties": {
          "reviewedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "outcome": {
            "enum": [
              "Continue",
              "ContinueWithConditions",
              "Terminate"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiSupplierReviewState": {
        "required": [
          "nextDue",
          "openTask",
          "optOut",
          "optOutHistory",
          "count",
          "recent"
        ],
        "type": "object",
        "properties": {
          "nextDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "openTask": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiOpenTask"
              }
            ]
          },
          "optOut": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiReviewOptOutAct"
              }
            ]
          },
          "optOutHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiReviewOptOutAct"
            }
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSupplierReview"
            }
          }
        }
      },
      "ApiSupplierReviewUpdate": {
        "type": "object",
        "properties": {
          "reviewedAt": {
            "type": "string",
            "format": "date"
          },
          "outcome": {
            "enum": [
              "Continue",
              "ContinueWithConditions",
              "Terminate"
            ],
            "type": "string"
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the body."
          }
        }
      },
      "ApiSupplierTerminateRequest": {
        "type": "object",
        "properties": {
          "terminatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "assetIdsToReturn": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ApiSupplierUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "category": {
            "enum": [
              "Hosting",
              "SaaS",
              "SubProcessor",
              "Professional",
              "Hardware",
              "Other"
            ],
            "type": "string"
          },
          "criticality": {
            "enum": [
              "Critical",
              "Important",
              "LowRisk"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "Onboarding",
              "Active",
              "UnderReview",
              "Terminating",
              "Terminated"
            ],
            "type": "string"
          },
          "country": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the country."
          },
          "website": {
            "type": [
              "null",
              "string"
            ],
            "description": "An absolute `http` or `https` URL of at most 2048 characters. `null` clears the website."
          },
          "processesPersonalData": {
            "type": "boolean"
          },
          "relationshipOwnerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `relationshipOwnerId`; `null` removes the Relationship Owner."
          },
          "relationshipOwnerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Relationship Owner's id; `null` removes the Relationship Owner, with `relationshipOwnerKind` `null`.",
            "format": "uuid"
          },
          "terminatedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "Corrects the termination date of a Terminated Supplier; `null` is refused on a Supplier that has the date.",
            "format": "date"
          }
        }
      },
      "ApiTask": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "descriptionHtml",
          "source",
          "sourceLabel",
          "state",
          "ownerKind",
          "ownerId",
          "assigneeKind",
          "assigneeId",
          "dueAt",
          "requiresEvidence",
          "resultHtml",
          "completedAt",
          "completedByUserId",
          "createdByUserId",
          "createdAt",
          "lastUpdatedAt",
          "links",
          "evidence",
          "workflow",
          "resultForm",
          "richCompletion",
          "assetReview"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "enum": [
              "AdHoc",
              "PolicyApproval",
              "PolicyAwareness",
              "PolicyReview",
              "ScopeReview",
              "RequirementReview",
              "RequirementOperatingEffectivenessCheck",
              "RiskReview",
              "OpportunityReview",
              "RiskTreatmentAction",
              "AssetReview",
              "AssetAccessReview",
              "SupplierReview",
              "SupplierEvaluation",
              "FindingRootCause",
              "FindingCorrectiveAction",
              "FindingEffectivenessCheck",
              "FindingImprovementAction",
              "FindingRejection",
              "EventReview",
              "ScheduleNextOccurrence",
              "VulnerabilityRemediation",
              "VulnerabilityVerification",
              "TrainingAssignment",
              "ContinuityPlanReview",
              "BusinessIssueReview",
              "InterestedPartyReview",
              "ObjectiveReview",
              "KpiMeasurement",
              "ProcedureReview",
              "ProcedureAwareness"
            ],
            "type": "string"
          },
          "sourceLabel": {
            "type": "string"
          },
          "state": {
            "enum": [
              "Open",
              "InProgress",
              "Done",
              "Cancelled"
            ],
            "type": "string"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "assigneeKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "assigneeId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "requiresEvidence": {
            "type": "boolean"
          },
          "resultHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "completedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "createdByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTaskLink"
            }
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "workflow": {
            "$ref": "#/components/schemas/ApiTaskWorkflow"
          },
          "resultForm": {
            "$ref": "#/components/schemas/ApiTaskResultForm"
          },
          "richCompletion": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiTaskRichCompletion"
              }
            ]
          },
          "assetReview": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiTaskAssetReview"
              }
            ]
          }
        }
      },
      "ApiTaskAssetReview": {
        "required": [
          "members",
          "excluded"
        ],
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTaskAssetReviewMember"
            }
          },
          "excluded": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTaskAssetReviewExcluded"
            }
          }
        }
      },
      "ApiTaskAssetReviewExcluded": {
        "required": [
          "id",
          "code",
          "name",
          "url",
          "reason"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ApiTaskAssetReviewMember": {
        "required": [
          "id",
          "code",
          "name",
          "url",
          "custodianKind",
          "custodianId",
          "lastReviewedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "custodianKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "custodianId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "lastReviewedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ApiTaskComplete": {
        "type": "object",
        "properties": {
          "resultHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "outcome": {
            "type": [
              "null",
              "string"
            ]
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "event": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiTaskCompletionEvent"
              }
            ]
          },
          "eventId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiTaskCompletionContinuityTest": {
        "type": "object",
        "properties": {
          "exerciseType": {
            "enum": [
              "Tabletop",
              "Walkthrough",
              "PartialFailover",
              "FullFailover"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "outcome": {
            "enum": [
              "Passed",
              "PassedWithFindings",
              "Failed"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "achievedRtoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "achievedRpoMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "conductedByUserId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "incidentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiTaskCompletionEvent": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "occurredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "continuityTest": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiTaskCompletionContinuityTest"
              }
            ]
          }
        }
      },
      "ApiTaskCountableOneOff": {
        "required": [
          "id",
          "code",
          "title",
          "occurredAt",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiTaskCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "assigneeKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "assigneeId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "requiresEvidence": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "links": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ApiTaskLinkInput"
            }
          }
        }
      },
      "ApiTaskCustodianChange": {
        "required": [
          "assetId",
          "custodianKind",
          "custodianId"
        ],
        "type": "object",
        "properties": {
          "assetId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "custodianKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "custodianId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiTaskLink": {
        "required": [
          "type",
          "id",
          "code",
          "title",
          "url"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiTaskLinkInput": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "Policy",
              "Scope",
              "Requirement",
              "Risk",
              "Asset",
              "Person",
              "Supplier",
              "Incident",
              "Vulnerability",
              "Event",
              "Finding",
              "ContinuityPlan",
              "TrainingCompletion",
              "Task",
              "Objective",
              "Kpi",
              "BusinessIssue",
              "Procedure",
              "InterestedParty",
              "PartyRequirement",
              "CriticalActivity",
              "TrainingCourse",
              "OrganisationProfile",
              "Role",
              "Schedule",
              "Opportunity",
              "Customer",
              "Change"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiTaskMailPreferenceUpdate": {
        "type": "object",
        "properties": {
          "preference": {
            "enum": [
              "FollowAccount",
              "On",
              "Off"
            ],
            "type": "string"
          }
        }
      },
      "ApiTaskMailSettings": {
        "required": [
          "account",
          "enabled",
          "preference"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "enabled": {
            "type": "boolean"
          },
          "preference": {
            "enum": [
              "FollowAccount",
              "On",
              "Off"
            ],
            "type": "string"
          }
        }
      },
      "ApiTaskMailSettingUpdate": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "ApiTaskOutcomeOption": {
        "required": [
          "value",
          "consequenceLabel"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "consequenceLabel": {
            "type": "string"
          }
        }
      },
      "ApiTaskRecordedDate": {
        "required": [
          "recordedAt"
        ],
        "type": "object",
        "properties": {
          "recordedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ApiTaskResult": {
        "type": "object",
        "properties": {
          "resultHtml": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiTaskResultForm": {
        "required": [
          "resultLabel",
          "isResultRequired",
          "outcomeOptions",
          "canComplete",
          "requiresEvidence"
        ],
        "type": "object",
        "properties": {
          "resultLabel": {
            "type": "string"
          },
          "isResultRequired": {
            "type": "boolean"
          },
          "outcomeOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTaskOutcomeOption"
            }
          },
          "canComplete": {
            "type": "boolean"
          },
          "requiresEvidence": {
            "type": "boolean"
          }
        }
      },
      "ApiTaskRichCompletion": {
        "required": [
          "url",
          "notice",
          "actionLabel",
          "recordedReviewUrl",
          "countableOneOffs"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "notice": {
            "type": "string"
          },
          "actionLabel": {
            "type": "string"
          },
          "recordedReviewUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "countableOneOffs": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ApiTaskCountableOneOff"
            }
          }
        }
      },
      "ApiTaskTemplate": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "titleTemplate",
          "descriptionTemplate",
          "recurrenceDays",
          "defaultOwnerKind",
          "defaultOwnerId",
          "defaultAssigneeKind",
          "defaultAssigneeId",
          "defaultDueOffsetDays",
          "defaultRequiresEvidence",
          "nextSpawnAt",
          "active"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          },
          "titleTemplate": {
            "type": "string"
          },
          "descriptionTemplate": {
            "type": [
              "null",
              "string"
            ]
          },
          "recurrenceDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "defaultOwnerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "defaultOwnerId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultAssigneeKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "defaultAssigneeId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "defaultDueOffsetDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "defaultRequiresEvidence": {
            "type": "boolean"
          },
          "nextSpawnAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "ApiTaskTemplateCreate": {
        "required": [
          "titleTemplate"
        ],
        "type": "object",
        "properties": {
          "titleTemplate": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionTemplate": {
            "type": [
              "null",
              "string"
            ]
          },
          "recurrenceDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "defaultOwnerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "defaultOwnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "defaultAssigneeKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "defaultAssigneeId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "defaultDueOffsetDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "defaultRequiresEvidence": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "nextSpawnAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ApiTaskTemplateUpdate": {
        "type": "object",
        "properties": {
          "titleTemplate": {
            "type": "string"
          },
          "descriptionTemplate": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "recurrenceDays": {
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "defaultOwnerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string"
          },
          "defaultOwnerId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultAssigneeKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`null` leaves the spawned tasks to the Owner."
          },
          "defaultAssigneeId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The default Assignee's id; `null` removes it, with `defaultAssigneeKind` `null`.",
            "format": "uuid"
          },
          "defaultDueOffsetDays": {
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "`null` clears the due offset.",
            "format": "int32"
          },
          "defaultRequiresEvidence": {
            "type": "boolean"
          },
          "nextSpawnAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` plans no next spawn.",
            "format": "date-time"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "ApiTaskUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "Sanitized HTML; `null` or a blank value clears it."
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the due date.",
            "format": "date"
          },
          "requiresEvidence": {
            "type": "boolean"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": "string",
            "description": "`Person` or `Role`, with `ownerId`. A task always has an Owner."
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "assigneeKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `assigneeId`; `null` hands the task back to the Owner."
          },
          "assigneeId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Assignee's id, with `assigneeKind`. `null` removes it, with `assigneeKind` `null`; alone it answers 422 while the task has an Assignee.",
            "format": "uuid"
          },
          "links": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ApiTaskLinkInput"
            },
            "description": "Replaces an ad-hoc task's Related to; `[]` or `null` removes them all. A spawned task's links are fixed."
          },
          "state": {
            "enum": [
              "Open",
              "InProgress",
              "Done",
              "Cancelled"
            ],
            "type": "string",
            "description": "Only the current state passes; start, complete, and cancel have their own actions."
          }
        }
      },
      "ApiTaskWorkflow": {
        "required": [
          "stepLabel",
          "urgency",
          "steps",
          "isRecurring",
          "hasReachedTerminal",
          "nextDueAt"
        ],
        "type": "object",
        "properties": {
          "stepLabel": {
            "type": "string"
          },
          "urgency": {
            "enum": [
              "Calm",
              "DueSoon",
              "Overdue"
            ],
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiWorkflowStep"
            }
          },
          "isRecurring": {
            "type": "boolean"
          },
          "hasReachedTerminal": {
            "type": "boolean"
          },
          "nextDueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ApiToolActivity": {
        "required": [
          "name",
          "outcome",
          "isWrite"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "isWrite": {
            "type": "boolean"
          }
        }
      },
      "ApiTrainingAssignAll": {
        "type": "object",
        "properties": {
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ApiTrainingAssignment": {
        "required": [
          "taskId",
          "taskCode",
          "taskUrl",
          "state",
          "dueAt",
          "person",
          "score",
          "finishedAt",
          "libraryVersion"
        ],
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string",
            "format": "uuid"
          },
          "taskCode": {
            "type": "string"
          },
          "taskUrl": {
            "type": "string"
          },
          "state": {
            "enum": [
              "Open",
              "InProgress",
              "Done",
              "Cancelled"
            ],
            "type": "string"
          },
          "dueAt": {
            "type": "string",
            "format": "date"
          },
          "person": {
            "$ref": "#/components/schemas/ApiRecordRef"
          },
          "score": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "finishedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "libraryVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiTrainingAssignmentCreate": {
        "required": [
          "personIds"
        ],
        "type": "object",
        "properties": {
          "personIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ApiTrainingAssignmentResult": {
        "required": [
          "account",
          "assigned",
          "skipped",
          "course"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "assigned": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiOpenTask"
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "course": {
            "$ref": "#/components/schemas/ApiTrainingCourse"
          }
        }
      },
      "ApiTrainingAudience": {
        "required": [
          "kind",
          "roleIds"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "Nobody",
              "Everyone",
              "Roles"
            ],
            "type": "string"
          },
          "roleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ApiTrainingAudienceInput": {
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "Nobody",
              "Everyone",
              "Roles"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "roleIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ApiTrainingCourse": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "librarySlug",
          "libraryVersion",
          "title",
          "descriptionHtml",
          "contentUrl",
          "contentEvidenceId",
          "category",
          "repeats",
          "audience",
          "createdAt",
          "lastUpdatedAt",
          "assignments",
          "linkedRequirements"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "librarySlug": {
            "type": [
              "null",
              "string"
            ]
          },
          "libraryVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentEvidenceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "category": {
            "enum": [
              "SecurityAwareness",
              "Phishing",
              "Privacy",
              "RoleSpecific",
              "Onboarding",
              "ContinuousLearning"
            ],
            "type": "string"
          },
          "repeats": {
            "type": "boolean"
          },
          "audience": {
            "$ref": "#/components/schemas/ApiTrainingAudience"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "assignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTrainingAssignment"
            }
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiLinkedRequirement"
            }
          }
        }
      },
      "ApiTrainingCourseCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "enum": [
              "SecurityAwareness",
              "Phishing",
              "Privacy",
              "RoleSpecific",
              "Onboarding",
              "ContinuousLearning"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "repeats": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "audience": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiTrainingAudienceInput"
              }
            ]
          }
        }
      },
      "ApiTrainingCourseFromLibrary": {
        "required": [
          "slug"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiTrainingCourseUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "contentUrl": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the content URL."
          },
          "contentEvidenceId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Evidence of this Account holding the course material. `null` clears the link.",
            "format": "uuid"
          },
          "category": {
            "enum": [
              "SecurityAwareness",
              "Phishing",
              "Privacy",
              "RoleSpecific",
              "Onboarding",
              "ContinuousLearning"
            ],
            "type": "string"
          },
          "repeats": {
            "type": "boolean"
          },
          "audience": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApiTrainingAudienceInput"
              }
            ]
          }
        }
      },
      "ApiTreatmentAction": {
        "required": [
          "id",
          "code",
          "title",
          "state",
          "dueAt",
          "assigneePersonId",
          "url"
        ],
        "type": "object",
        "properties": {
          "account": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiAccount"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "assigneePersonId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ApiTreatmentActionCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "assigneePersonId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiUploadCreate": {
        "required": [
          "target",
          "fileName"
        ],
        "type": "object",
        "properties": {
          "target": {
            "type": [
              "null",
              "string"
            ]
          },
          "fileName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiUploadLink": {
        "required": [
          "account",
          "uploadId",
          "url",
          "target",
          "fileName",
          "partSize",
          "maxBytes",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "uploadId": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "partSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "maxBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiVulnerability": {
        "required": [
          "account",
          "id",
          "code",
          "url",
          "title",
          "externalIdentifier",
          "descriptionHtml",
          "severity",
          "cvssScore",
          "source",
          "sourceReference",
          "discoveredAt",
          "discoveredDuringEvent",
          "ownerKind",
          "ownerId",
          "externalLink",
          "affectedAssets",
          "createdAt",
          "lastUpdatedAt",
          "workflowState",
          "isFinished",
          "openChainTask",
          "acceptedRisk",
          "canAddAttachments",
          "timeline"
        ],
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ApiAccount"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "externalIdentifier": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "severity": {
            "enum": [
              "Low",
              "Medium",
              "High",
              "Critical"
            ],
            "type": "string"
          },
          "cvssScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "source": {
            "enum": [
              "Manual",
              "VendorAdvisory",
              "Scanner",
              "PenTest",
              "BugBounty"
            ],
            "type": "string"
          },
          "sourceReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "discoveredAt": {
            "type": "string",
            "format": "date"
          },
          "discoveredDuringEvent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiRecordRef"
              }
            ]
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          },
          "affectedAssets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiRecordRef"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "workflowState": {
            "enum": [
              "Open",
              "RemediationInProgress",
              "AwaitingVerification",
              "Accepted",
              "FalsePositive",
              "Resolved"
            ],
            "type": "string"
          },
          "isFinished": {
            "type": "boolean"
          },
          "openChainTask": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiOpenTask"
              }
            ]
          },
          "acceptedRisk": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiRecordRef"
              }
            ]
          },
          "canAddAttachments": {
            "type": "boolean"
          },
          "timeline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiChainTask"
            }
          }
        }
      },
      "ApiVulnerabilityAcceptRiskRequest": {
        "required": [
          "riskId",
          "rationaleHtml"
        ],
        "type": "object",
        "properties": {
          "riskId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "rationaleHtml": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiVulnerabilityCreate": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalIdentifier": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "severity": {
            "enum": [
              "Low",
              "Medium",
              "High",
              "Critical"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "cvssScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "source": {
            "enum": [
              "Manual",
              "VendorAdvisory",
              "Scanner",
              "PenTest",
              "BugBounty"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "sourceReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "discoveredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "discoveredDuringEventId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "affectedAssetIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiVulnerabilityFalsePositiveRequest": {
        "required": [
          "rationaleHtml"
        ],
        "type": "object",
        "properties": {
          "rationaleHtml": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiVulnerabilityUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "externalIdentifier": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the external identifier."
          },
          "descriptionHtml": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the description."
          },
          "severity": {
            "enum": [
              "Low",
              "Medium",
              "High",
              "Critical"
            ],
            "type": "string"
          },
          "cvssScore": {
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "`null` clears the CVSS score.",
            "format": "double"
          },
          "source": {
            "enum": [
              "Manual",
              "VendorAdvisory",
              "Scanner",
              "PenTest",
              "BugBounty"
            ],
            "type": "string"
          },
          "sourceReference": {
            "type": [
              "null",
              "string"
            ],
            "description": "`null` clears the source reference."
          },
          "discoveredAt": {
            "type": "string",
            "format": "date"
          },
          "discoveredDuringEventId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Event the Vulnerability was discovered during; `null` clears it.",
            "format": "uuid"
          },
          "ownerKind": {
            "enum": [
              "Person",
              "Role"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "`Person` or `Role`, with `ownerId`; `null` removes the Owner."
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Owner's id; `null` removes it, with `ownerKind` `null`.",
            "format": "uuid"
          },
          "affectedAssetIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the whole set; `null` or `[]` clears it. Assets must not be Retired."
          },
          "externalLink": {
            "type": [
              "null",
              "string"
            ],
            "description": "An absolute `http` or `https` URL of at most 2048 characters. `null` clears the link."
          },
          "workflowState": {
            "enum": [
              "Open",
              "RemediationInProgress",
              "AwaitingVerification",
              "Accepted",
              "FalsePositive",
              "Resolved"
            ],
            "type": "string"
          }
        }
      },
      "ApiWorkflowStep": {
        "required": [
          "label",
          "isCurrent",
          "isPast",
          "isTerminal"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "isPast": {
            "type": "boolean"
          },
          "isTerminal": {
            "type": "boolean"
          }
        }
      },
      "Problem": {
        "required": [
          "type",
          "title",
          "status"
        ],
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "unauthorized",
              "allowance-exhausted",
              "no-account",
              "license-closed",
              "browser-handoff",
              "forbidden",
              "not-found",
              "conflict",
              "validation",
              "rate-limited"
            ],
            "type": "string",
            "description": "The stable problem token. An unexpected failure (500) answers `about:blank`."
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              },
              "name": {
                "type": "string"
              }
            },
            "description": "The Account acted in, when known."
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "format": "int64"
                },
                "name": {
                  "type": "string"
                }
              }
            },
            "description": "`no-account` only: the Accounts the credential can switch to."
          },
          "handoffUrl": {
            "type": "string",
            "description": "`browser-handoff` only: the page where a person finishes the act.",
            "format": "uri"
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "`validation` only, for a body that does not bind: messages by camelCase field."
          }
        },
        "description": "ProblemDetails (RFC 9457). Branch on `type`; `title` and `detail` are in the User's UI language."
      },
      "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"
            ]
          }
        }
      },
      "Stream": {
        "type": "string",
        "format": "binary"
      }
    },
    "securitySchemes": {
      "agentConnection": {
        "type": "oauth2",
        "description": "An Agent connection: OAuth 2 authorization code with PKCE at Auth, for the resource `https://demo.mvdm.io/compliance/api`. No consent step beyond the sign-in itself.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://auth.mvdm.io/connect/authorize",
            "tokenUrl": "https://auth.mvdm.io/connect/token",
            "refreshUrl": "https://auth.mvdm.io/connect/token",
            "scopes": { }
          }
        }
      },
      "personalToken": {
        "type": "http",
        "description": "A Personal token (`mvdm_pat_…`), created on API & Agent Access on Auth.",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "agentConnection": [ ]
    },
    {
      "personalToken": [ ]
    }
  ],
  "tags": [
    {
      "name": "Accounts"
    },
    {
      "name": "Assets"
    },
    {
      "name": "Attachments"
    },
    {
      "name": "Business Issues"
    },
    {
      "name": "Changes"
    },
    {
      "name": "Checks"
    },
    {
      "name": "Continuity Plans"
    },
    {
      "name": "Conversations"
    },
    {
      "name": "Course library"
    },
    {
      "name": "Critical Activities"
    },
    {
      "name": "Customers"
    },
    {
      "name": "Events"
    },
    {
      "name": "Evidence"
    },
    {
      "name": "Findings"
    },
    {
      "name": "Framework statement"
    },
    {
      "name": "Frameworks"
    },
    {
      "name": "Gap analysis"
    },
    {
      "name": "Import sessions"
    },
    {
      "name": "Incidents"
    },
    {
      "name": "Interested Parties"
    },
    {
      "name": "Invitations"
    },
    {
      "name": "Kpis"
    },
    {
      "name": "Legal Acceptance"
    },
    {
      "name": "License"
    },
    {
      "name": "Notifications"
    },
    {
      "name": "Objectives"
    },
    {
      "name": "Opportunities"
    },
    {
      "name": "Organisation profile"
    },
    {
      "name": "People"
    },
    {
      "name": "Policies"
    },
    {
      "name": "Procedures"
    },
    {
      "name": "Proposed coverage"
    },
    {
      "name": "Requirements"
    },
    {
      "name": "Risks"
    },
    {
      "name": "Roles"
    },
    {
      "name": "Schedules"
    },
    {
      "name": "Scope"
    },
    {
      "name": "Settings"
    },
    {
      "name": "Suppliers"
    },
    {
      "name": "Task templates"
    },
    {
      "name": "Tasks"
    },
    {
      "name": "Training courses"
    },
    {
      "name": "Uploads"
    },
    {
      "name": "Vulnerabilities"
    }
  ]
}