{
  "openapi": "3.1.1",
  "info": {
    "title": "Lodgeit API: Core",
    "description": "Every operation lists every scope granting it. A `manage:` scope also grants what its `read:` twin does, and a scope covers the whole path under it: `manage:core` grants every operation of the area. The personal fields of the responses and requests stay withheld until the matching `unlock:` scope is granted.\n\n## Authentication\n\nThe API accepts the access tokens of the *OAuth 2.0* client credentials flow. To obtain the credentials, a workspace owner registers a service application in [Lodgeit SSO](https://sso.lodgeit.com/account/integrations/service-applications) under **Account › Integrations › Service applications**, grants it the scopes it needs, and issues a secret. The application then exchanges its client id and secret for an access token at `https://sso.lodgeit.com/connect/token`.\n\n## Problems\n\nEvery error response is a problem object: its `type` is a stable URI naming the kind of problem, listed below, \nits `title` the constant summary, and its `detail` the explanation of the occurrence. \nThe identifiers involved come as extra members, not inside the text, and every problem carries a \n`traceId` naming the occurrence: quote it when reporting one. Each entry below shows what the response carries.\n\n### Client address in use\n\nAn address the request would remove is referenced by other client records, such as assets or borrowings, and cannot be deleted.\n\n- **type**: `\"/core/$problems/client-address-in-use\"`\n- **title**: `\"A client address is still in use.\"`\n- **status**: `409`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Client backs the workspace\n\nThe workspace and its client record are the same entity, so archiving it would take the workspace with it.\n\n- **type**: `\"/core/$problems/client-is-workspace\"`\n- **title**: `\"The client backs the workspace and cannot be archived.\"`\n- **status**: `422`\n- **clientId**: `\"5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Client code already in use\n\nAnother client of the workspace carries the code.\n\n- **type**: `\"/core/$problems/client-code-already-in-use\"`\n- **title**: `\"The client code is already in use.\"`\n- **status**: `409`\n- **code**: `\"ACME\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Client group already exists\n\nAnother client group of the workspace carries the name.\n\n- **type**: `\"/core/$problems/client-group-already-exists\"`\n- **title**: `\"The client group already exists.\"`\n- **status**: `409`\n- **name**: `\"Smith Family\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Client group not empty\n\nThe group cannot be deleted while clients belong to it unless `force` is set.\n\n- **type**: `\"/core/$problems/client-group-not-empty\"`\n- **title**: `\"The client group still has clients.\"`\n- **status**: `409`\n- **groupId**: `\"7f3a9c21-5b6d-4e08-9a1f-2c4d6e8b0a35\"`\n- **clientCount**: `3`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Client group not found\n\nThe identifier matched no client group of the workspace.\n\n- **type**: `\"/core/$problems/client-group-not-found\"`\n- **title**: `\"The client group is not found.\"`\n- **status**: `422`\n- **groupId**: `\"7f3a9c21-5b6d-4e08-9a1f-2c4d6e8b0a35\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Client not found\n\nThe reference matched no client of the workspace; whichever of the two members addressed it is echoed.\n\n- **type**: `\"/core/$problems/client-not-found\"`\n- **title**: `\"The client is not found.\"`\n- **status**: `422`\n- **clientId**: `\"5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31\"`\n- **clientCode**: `\"ACME\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Client profile field required\n\nThe requested profile type cannot do without the field.\n\n- **type**: `\"/core/$problems/client-profile-field-required\"`\n- **title**: `\"The client profile type requires a field.\"`\n- **status**: `400`\n- **field**: `\"lastName\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Client related to itself\n\n- **type**: `\"/core/$problems/client-relation-self\"`\n- **title**: `\"The client cannot relate to itself.\"`\n- **status**: `400`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Client relation not found\n\nThe two clients have no relation with the role.\n\n- **type**: `\"/core/$problems/client-relation-not-found\"`\n- **title**: `\"The client relation is not found.\"`\n- **status**: `422`\n- **clientId**: `\"5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31\"`\n- **targetId**: `\"b2e7a4c9-0d15-4f63-8a72-1c9e3d5b6f84\"`\n- **role**: `\"Director\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Duplicate client relation roles\n\n- **type**: `\"/core/$problems/client-relation-duplicate-roles\"`\n- **title**: `\"The client already has relations with the roles.\"`\n- **status**: `409`\n- **roles**: `[\"Director\"]`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Invalid page token\n\nA page token continues the listing it was issued for; the filter must not change between pages.\n\n- **type**: `\"/core/$problems/page-token-invalid\"`\n- **title**: `\"The page token does not match the requested listing.\"`\n- **status**: `422`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Member not found\n\n- **type**: `\"/core/$problems/member-not-found\"`\n- **title**: `\"The user is not an active workspace member.\"`\n- **status**: `422`\n- **userId**: `\"3a6f0b18-9c2d-4e75-b103-8f4a5c6d7e29\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Member owns the workspace\n\n- **type**: `\"/core/$problems/member-owns-workspace\"`\n- **title**: `\"The member owns the workspace and cannot be archived.\"`\n- **status**: `422`\n- **userId**: `\"3a6f0b18-9c2d-4e75-b103-8f4a5c6d7e29\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Own membership\n\n- **type**: `\"/core/$problems/own-membership\"`\n- **title**: `\"The caller cannot archive their own membership.\"`\n- **status**: `422`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Team already exists\n\nAnother team of the workspace carries the name.\n\n- **type**: `\"/core/$problems/team-already-exists\"`\n- **title**: `\"The team already exists.\"`\n- **status**: `409`\n- **name**: `\"Payroll\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Team not empty\n\nThe team cannot be deleted while members belong to it or clients are assigned to it unless `force` is set.\n\n- **type**: `\"/core/$problems/team-not-empty\"`\n- **title**: `\"The team still has members or client assignments.\"`\n- **status**: `409`\n- **teamId**: `\"c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47\"`\n- **memberCount**: `4`\n- **clientCount**: `12`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Team not found\n\nThe identifier matched no team of the workspace.\n\n- **type**: `\"/core/$problems/team-not-found\"`\n- **title**: `\"The team is not found.\"`\n- **status**: `422`\n- **teamId**: `\"c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Unknown address country\n\n- **type**: `\"/core/$problems/unknown-address-country\"`\n- **title**: `\"The address country is not registered.\"`\n- **status**: `422`\n- **address**: `\"business\"`\n- **country**: `\"ZZ\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Unknown address subdivision\n\n- **type**: `\"/core/$problems/unknown-address-subdivision\"`\n- **title**: `\"The address subdivision is not registered.\"`\n- **status**: `422`\n- **address**: `\"postal\"`\n- **subdivision**: `\"AU-ZZ\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Unknown ANZSIC code\n\n- **type**: `\"/core/$problems/unknown-anzsic-code\"`\n- **title**: `\"The ANZSIC code is not registered.\"`\n- **status**: `422`\n- **code**: `\"99999\"`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Unknown clients\n\n- **type**: `\"/core/$problems/unknown-clients\"`\n- **title**: `\"Some clients are not defined in the workspace.\"`\n- **status**: `422`\n- **clientIds**: `[\"5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31\",\"9b4e2f7d-1a08-4c36-85b9-0e7d2c4a6f13\"]`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Unknown members\n\n- **type**: `\"/core/$problems/unknown-members\"`\n- **title**: `\"Some users are not accepted workspace members.\"`\n- **status**: `422`\n- **userIds**: `[\"3a6f0b18-9c2d-4e75-b103-8f4a5c6d7e29\",\"e8d7c6b5-4a39-4210-9f8e-7d6c5b4a3f21\"]`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Unknown teams\n\n- **type**: `\"/core/$problems/unknown-teams\"`\n- **title**: `\"Some teams are not defined in the workspace.\"`\n- **status**: `422`\n- **teamIds**: `[\"c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47\"]`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Unsupported client relation roles\n\nThe profile types of the two clients do not allow the roles.\n\n- **type**: `\"/core/$problems/client-relation-unsupported-roles\"`\n- **title**: `\"The relation roles are not possible between the two clients.\"`\n- **status**: `422`\n- **roles**: `[\"Director\"]`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Validation failure\n\nEvery offending value is keyed by its JSON path.\n\n- **type**: `\"/core/$problems/validation\"`\n- **title**: `\"One or more validation errors occurred.\"`\n- **status**: `400`\n- **errors**: `{\"<property.path>\":[\"The value is invalid.\"],\"<array.property.path>[1]\":[\"The array item is invalid.\"]}`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`\n\n### Workspace not found\n\n- **type**: `\"/core/$problems/workspace-not-found\"`\n- **title**: `\"The tenant has no workspace.\"`\n- **status**: `422`\n- **traceId**: `\"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01\"`",
    "version": "Production"
  },
  "servers": [
    {
      "url": "https://api.lodgeit.com/"
    }
  ],
  "paths": {
    "/core/clients/v1-preview/count": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "Count clients",
        "description": "Counts the clients of the caller's workspace.\n\n> [!note]\n> **User** `optional` — only the scopes are checked",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountClientsRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientCountV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.clients"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/create": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "Create client",
        "description": "Creates a client in the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`\n> - **Personal data** `optional` — unlocked by: `unlock:tfn` | `unlock:director-id` | `unlock:dob`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClientRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRefV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "unknown-address-country": {
                    "summary": "The address country is not registered.",
                    "value": {
                      "type": "/core/$problems/unknown-address-country",
                      "title": "The address country is not registered.",
                      "status": 422,
                      "address": "business",
                      "country": "ZZ",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-address-subdivision": {
                    "summary": "The address subdivision is not registered.",
                    "value": {
                      "type": "/core/$problems/unknown-address-subdivision",
                      "title": "The address subdivision is not registered.",
                      "status": 422,
                      "address": "postal",
                      "subdivision": "AU-ZZ",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-anzsic-code": {
                    "summary": "The ANZSIC code is not registered.",
                    "value": {
                      "type": "/core/$problems/unknown-anzsic-code",
                      "title": "The ANZSIC code is not registered.",
                      "status": 422,
                      "code": "99999",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-code-already-in-use": {
                    "summary": "The client code is already in use.",
                    "description": "Another client of the workspace carries the code.",
                    "value": {
                      "type": "/core/$problems/client-code-already-in-use",
                      "title": "The client code is already in use.",
                      "status": 409,
                      "code": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/get-by-code": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "Get client by code",
        "description": "Returns a client of the caller's workspace by its custom code.\n\n> [!note]\n> **User** `optional` — only the scopes are checked\n> - **Personal data** `optional` — unlocked by: `unlock:tfn` | `unlock:director-id` | `unlock:dob`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetClientByCodeRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.clients"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/get-by-id": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "Get client by id",
        "description": "Returns a client of the caller's workspace by its unique identifier.\n\n> [!note]\n> **User** `optional` — only the scopes are checked\n> - **Personal data** `optional` — unlocked by: `unlock:tfn` | `unlock:director-id` | `unlock:dob`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetClientByIdRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.clients"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/list": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "List clients",
        "description": "Lists all clients of the caller's workspace.\n\n> [!note]\n> **User** `optional` — only the scopes are checked\n> - **Personal data** `optional` — unlocked by: `unlock:tfn` | `unlock:director-id` | `unlock:dob`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListClientsRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientPageV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "page-token-invalid": {
                    "summary": "The page token does not match the requested listing.",
                    "description": "A page token continues the listing it was issued for; the filter must not change between pages.",
                    "value": {
                      "type": "/core/$problems/page-token-invalid",
                      "title": "The page token does not match the requested listing.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.clients"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/list-assigned": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "List assigned clients",
        "description": "Lists the clients of the caller's workspace assigned to the caller.\n\n> [!warning]\n> **User** `required` — machine callers are rejected\n> - **Personal data** `optional` — unlocked by: `unlock:tfn` | `unlock:director-id` | `unlock:dob`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListClientsRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientPageV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "page-token-invalid": {
                    "summary": "The page token does not match the requested listing.",
                    "description": "A page token continues the listing it was issued for; the filter must not change between pages.",
                    "value": {
                      "type": "/core/$problems/page-token-invalid",
                      "title": "The page token does not match the requested listing.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.clients"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/modify-profile": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "Modify client profile",
        "description": "Modifies the profile of a client of the caller's workspace; only the supplied fields change.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`\n> - **Personal data** `optional` — unlocked by: `unlock:tfn` | `unlock:director-id` | `unlock:dob`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModifyClientProfileRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "client-profile-field-required": {
                    "summary": "The client profile type requires a field.",
                    "description": "The requested profile type cannot do without the field.",
                    "value": {
                      "type": "/core/$problems/client-profile-field-required",
                      "title": "The client profile type requires a field.",
                      "status": 400,
                      "field": "lastName",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-address-country": {
                    "summary": "The address country is not registered.",
                    "value": {
                      "type": "/core/$problems/unknown-address-country",
                      "title": "The address country is not registered.",
                      "status": 422,
                      "address": "business",
                      "country": "ZZ",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-address-subdivision": {
                    "summary": "The address subdivision is not registered.",
                    "value": {
                      "type": "/core/$problems/unknown-address-subdivision",
                      "title": "The address subdivision is not registered.",
                      "status": 422,
                      "address": "postal",
                      "subdivision": "AU-ZZ",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-anzsic-code": {
                    "summary": "The ANZSIC code is not registered.",
                    "value": {
                      "type": "/core/$problems/unknown-anzsic-code",
                      "title": "The ANZSIC code is not registered.",
                      "status": 422,
                      "code": "99999",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-address-in-use": {
                    "summary": "A client address is still in use.",
                    "description": "An address the request would remove is referenced by other client records, such as assets or borrowings, and cannot be deleted.",
                    "value": {
                      "type": "/core/$problems/client-address-in-use",
                      "title": "A client address is still in use.",
                      "status": 409,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/replace-profile": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "Replace client profile",
        "description": "Replaces the profile of a client of the caller's workspace as a whole: omitted contact details are removed, the first e-mail address becomes the primary one, and the personal fields the caller is not granted to unlock are kept as they are.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`\n> - **Personal data** `optional` — unlocked by: `unlock:tfn` | `unlock:director-id` | `unlock:dob`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceClientProfileRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-address-country": {
                    "summary": "The address country is not registered.",
                    "value": {
                      "type": "/core/$problems/unknown-address-country",
                      "title": "The address country is not registered.",
                      "status": 422,
                      "address": "business",
                      "country": "ZZ",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-address-subdivision": {
                    "summary": "The address subdivision is not registered.",
                    "value": {
                      "type": "/core/$problems/unknown-address-subdivision",
                      "title": "The address subdivision is not registered.",
                      "status": 422,
                      "address": "postal",
                      "subdivision": "AU-ZZ",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-anzsic-code": {
                    "summary": "The ANZSIC code is not registered.",
                    "value": {
                      "type": "/core/$problems/unknown-anzsic-code",
                      "title": "The ANZSIC code is not registered.",
                      "status": 422,
                      "code": "99999",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-address-in-use": {
                    "summary": "A client address is still in use.",
                    "description": "An address the request would remove is referenced by other client records, such as assets or borrowings, and cannot be deleted.",
                    "value": {
                      "type": "/core/$problems/client-address-in-use",
                      "title": "A client address is still in use.",
                      "status": 409,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/set-archived-flag": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "Set client archived flag",
        "description": "Archives or unarchives a client of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientDelete`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetClientArchivedFlagRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangeReport"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-is-workspace": {
                    "summary": "The client backs the workspace and cannot be archived.",
                    "description": "The workspace and its client record are the same entity, so archiving it would take the workspace with it.",
                    "value": {
                      "type": "/core/$problems/client-is-workspace",
                      "title": "The client backs the workspace and cannot be archived.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/set-code": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "Set client code",
        "description": "Sets or clears the custom code of a client of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetClientCodeRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangeReport"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-code-already-in-use": {
                    "summary": "The client code is already in use.",
                    "description": "Another client of the workspace carries the code.",
                    "value": {
                      "type": "/core/$problems/client-code-already-in-use",
                      "title": "The client code is already in use.",
                      "status": 409,
                      "code": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/set-private-flag": {
      "post": {
        "tags": [
          "Clients · V1 Preview"
        ],
        "summary": "Set client private flag",
        "description": "Makes a client of the caller's workspace private or public.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetClientPrivateFlagRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangeReport"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/assignments/assign-members": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Assignments"
        ],
        "summary": "Assign members to client",
        "description": "Assigns workspace members to a client of the caller's workspace, granting them access to it.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientTeamManage`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignMembersToClientRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-members": {
                    "summary": "Some users are not accepted workspace members.",
                    "value": {
                      "type": "/core/$problems/unknown-members",
                      "title": "Some users are not accepted workspace members.",
                      "status": 422,
                      "userIds": [
                        "3a6f0b18-9c2d-4e75-b103-8f4a5c6d7e29",
                        "e8d7c6b5-4a39-4210-9f8e-7d6c5b4a3f21"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/assignments/assign-teams": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Assignments"
        ],
        "summary": "Assign teams to client",
        "description": "Assigns workspace teams to a client of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientTeamManage`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTeamsToClientRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-teams": {
                    "summary": "Some teams are not defined in the workspace.",
                    "value": {
                      "type": "/core/$problems/unknown-teams",
                      "title": "Some teams are not defined in the workspace.",
                      "status": 422,
                      "teamIds": [
                        "c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/assignments/set-owner": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Assignments"
        ],
        "summary": "Set client owner",
        "description": "Makes a workspace member the owner of a client of the caller's workspace, replacing the current one, or withdraws the current owner. A client has at most one owner. A member that is not assigned to the client yet is assigned to it as well.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientTeamManage`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetClientOwnerRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-members": {
                    "summary": "Some users are not accepted workspace members.",
                    "value": {
                      "type": "/core/$problems/unknown-members",
                      "title": "Some users are not accepted workspace members.",
                      "status": 422,
                      "userIds": [
                        "3a6f0b18-9c2d-4e75-b103-8f4a5c6d7e29",
                        "e8d7c6b5-4a39-4210-9f8e-7d6c5b4a3f21"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/assignments/unassign-members": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Assignments"
        ],
        "summary": "Unassign members from client",
        "description": "Unassigns workspace members from a client of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientTeamManage`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnassignMembersFromClientRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-members": {
                    "summary": "Some users are not accepted workspace members.",
                    "value": {
                      "type": "/core/$problems/unknown-members",
                      "title": "Some users are not accepted workspace members.",
                      "status": 422,
                      "userIds": [
                        "3a6f0b18-9c2d-4e75-b103-8f4a5c6d7e29",
                        "e8d7c6b5-4a39-4210-9f8e-7d6c5b4a3f21"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/assignments/unassign-teams": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Assignments"
        ],
        "summary": "Unassign teams from client",
        "description": "Unassigns workspace teams from a client of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientTeamManage`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnassignTeamsFromClientRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-teams": {
                    "summary": "Some teams are not defined in the workspace.",
                    "value": {
                      "type": "/core/$problems/unknown-teams",
                      "title": "Some teams are not defined in the workspace.",
                      "status": 422,
                      "teamIds": [
                        "c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/groups/add-clients": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Groups"
        ],
        "summary": "Add clients to group",
        "description": "Adds clients of the caller's workspace to a client group.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddClientsToGroupRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-group-not-found": {
                    "summary": "The client group is not found.",
                    "description": "The identifier matched no client group of the workspace.",
                    "value": {
                      "type": "/core/$problems/client-group-not-found",
                      "title": "The client group is not found.",
                      "status": 422,
                      "groupId": "7f3a9c21-5b6d-4e08-9a1f-2c4d6e8b0a35",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-clients": {
                    "summary": "Some clients are not defined in the workspace.",
                    "value": {
                      "type": "/core/$problems/unknown-clients",
                      "title": "Some clients are not defined in the workspace.",
                      "status": 422,
                      "clientIds": [
                        "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                        "9b4e2f7d-1a08-4c36-85b9-0e7d2c4a6f13"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/groups/create": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Groups"
        ],
        "summary": "Create client group",
        "description": "Creates a client group in the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClientGroupRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientGroupRefV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-group-already-exists": {
                    "summary": "The client group already exists.",
                    "description": "Another client group of the workspace carries the name.",
                    "value": {
                      "type": "/core/$problems/client-group-already-exists",
                      "title": "The client group already exists.",
                      "status": 409,
                      "name": "Smith Family",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/groups/delete": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Groups"
        ],
        "summary": "Delete client group",
        "description": "Deletes a client group of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientDelete`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteClientGroupRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-group-not-found": {
                    "summary": "The client group is not found.",
                    "description": "The identifier matched no client group of the workspace.",
                    "value": {
                      "type": "/core/$problems/client-group-not-found",
                      "title": "The client group is not found.",
                      "status": 422,
                      "groupId": "7f3a9c21-5b6d-4e08-9a1f-2c4d6e8b0a35",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-group-not-empty": {
                    "summary": "The client group still has clients.",
                    "description": "The group cannot be deleted while clients belong to it unless `force` is set.",
                    "value": {
                      "type": "/core/$problems/client-group-not-empty",
                      "title": "The client group still has clients.",
                      "status": 409,
                      "groupId": "7f3a9c21-5b6d-4e08-9a1f-2c4d6e8b0a35",
                      "clientCount": 3,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/groups/list": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Groups"
        ],
        "summary": "List client groups",
        "description": "Lists the client groups of the caller's workspace.\n\n> [!note]\n> **User** `optional` — only the scopes are checked",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientGroupsV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.clients"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/groups/remove-clients": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Groups"
        ],
        "summary": "Remove clients from group",
        "description": "Removes clients of the caller's workspace from a client group.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveClientsFromGroupRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-group-not-found": {
                    "summary": "The client group is not found.",
                    "description": "The identifier matched no client group of the workspace.",
                    "value": {
                      "type": "/core/$problems/client-group-not-found",
                      "title": "The client group is not found.",
                      "status": 422,
                      "groupId": "7f3a9c21-5b6d-4e08-9a1f-2c4d6e8b0a35",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-clients": {
                    "summary": "Some clients are not defined in the workspace.",
                    "value": {
                      "type": "/core/$problems/unknown-clients",
                      "title": "Some clients are not defined in the workspace.",
                      "status": 422,
                      "clientIds": [
                        "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                        "9b4e2f7d-1a08-4c36-85b9-0e7d2c4a6f13"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/groups/rename": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Groups"
        ],
        "summary": "Rename client group",
        "description": "Renames a client group of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameClientGroupRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-group-not-found": {
                    "summary": "The client group is not found.",
                    "description": "The identifier matched no client group of the workspace.",
                    "value": {
                      "type": "/core/$problems/client-group-not-found",
                      "title": "The client group is not found.",
                      "status": 422,
                      "groupId": "7f3a9c21-5b6d-4e08-9a1f-2c4d6e8b0a35",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-group-already-exists": {
                    "summary": "The client group already exists.",
                    "description": "Another client group of the workspace carries the name.",
                    "value": {
                      "type": "/core/$problems/client-group-already-exists",
                      "title": "The client group already exists.",
                      "status": 409,
                      "name": "Smith Family",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/relations/add": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Relations"
        ],
        "summary": "Add client relations",
        "description": "Adds relations from a client of the caller's workspace to another client, mirroring each on the related client.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddClientRelationsRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "client-relation-self": {
                    "summary": "The client cannot relate to itself.",
                    "value": {
                      "type": "/core/$problems/client-relation-self",
                      "title": "The client cannot relate to itself.",
                      "status": 400,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "client-relation-unsupported-roles": {
                    "summary": "The relation roles are not possible between the two clients.",
                    "description": "The profile types of the two clients do not allow the roles.",
                    "value": {
                      "type": "/core/$problems/client-relation-unsupported-roles",
                      "title": "The relation roles are not possible between the two clients.",
                      "status": 422,
                      "roles": [
                        "Director"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-relation-duplicate-roles": {
                    "summary": "The client already has relations with the roles.",
                    "value": {
                      "type": "/core/$problems/client-relation-duplicate-roles",
                      "title": "The client already has relations with the roles.",
                      "status": 409,
                      "roles": [
                        "Director"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/relations/list-possible-roles": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Relations"
        ],
        "summary": "List possible relation roles",
        "description": "Lists the relation roles possible between two clients of the caller's workspace.\n\n> [!note]\n> **User** `optional` — only the scopes are checked",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListPossibleClientRelationRolesRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRelationRolesV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.clients"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/relations/remove": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Relations"
        ],
        "summary": "Remove client relation",
        "description": "Removes a relation between two clients of the caller's workspace, including its mirror on the related client.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveClientRelationRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "client-relation-not-found": {
                    "summary": "The client relation is not found.",
                    "description": "The two clients have no relation with the role.",
                    "value": {
                      "type": "/core/$problems/client-relation-not-found",
                      "title": "The client relation is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "targetId": "b2e7a4c9-0d15-4f63-8a72-1c9e3d5b6f84",
                      "role": "Director",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/clients/v1-preview/relations/set-period": {
      "post": {
        "tags": [
          "Clients · V1 Preview · Relations"
        ],
        "summary": "Set client relation period",
        "description": "Sets or clears the period of a relation between two clients of the caller's workspace, mirrored on the related client.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Permissions** `required` — `ClientEdit`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetClientRelationPeriodRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangeReport"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "client-not-found": {
                    "summary": "The client is not found.",
                    "description": "The reference matched no client of the workspace; whichever of the two members addressed it is echoed.",
                    "value": {
                      "type": "/core/$problems/client-not-found",
                      "title": "The client is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "clientCode": "ACME",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "client-relation-not-found": {
                    "summary": "The client relation is not found.",
                    "description": "The two clients have no relation with the role.",
                    "value": {
                      "type": "/core/$problems/client-relation-not-found",
                      "title": "The client relation is not found.",
                      "status": 422,
                      "clientId": "5d9c1f0e-7a3b-4c82-9e1d-6f2a8b4c0d31",
                      "targetId": "b2e7a4c9-0d15-4f63-8a72-1c9e3d5b6f84",
                      "role": "Director",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.clients"
            ]
          }
        ]
      }
    },
    "/core/workspaces/v1-preview/list-members": {
      "post": {
        "tags": [
          "Workspaces · V1 Preview"
        ],
        "summary": "List members",
        "description": "Lists the members of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Roles** `required` — one of: `Owner` | `Administrator` | `Member`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListMembersRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceMembersV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.workspaces"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.workspaces"
            ]
          }
        ]
      }
    },
    "/core/workspaces/v1-preview/teams/add-members": {
      "post": {
        "tags": [
          "Workspaces · V1 Preview · Teams"
        ],
        "summary": "Add members to team",
        "description": "Adds workspace members to a team of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Roles** `required` — one of: `Owner` | `Administrator`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddMembersToTeamRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "team-not-found": {
                    "summary": "The team is not found.",
                    "description": "The identifier matched no team of the workspace.",
                    "value": {
                      "type": "/core/$problems/team-not-found",
                      "title": "The team is not found.",
                      "status": 422,
                      "teamId": "c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-members": {
                    "summary": "Some users are not accepted workspace members.",
                    "value": {
                      "type": "/core/$problems/unknown-members",
                      "title": "Some users are not accepted workspace members.",
                      "status": 422,
                      "userIds": [
                        "3a6f0b18-9c2d-4e75-b103-8f4a5c6d7e29",
                        "e8d7c6b5-4a39-4210-9f8e-7d6c5b4a3f21"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.workspaces"
            ]
          }
        ]
      }
    },
    "/core/workspaces/v1-preview/teams/create": {
      "post": {
        "tags": [
          "Workspaces · V1 Preview · Teams"
        ],
        "summary": "Create team",
        "description": "Creates a team in the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Roles** `required` — one of: `Owner` | `Administrator`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTeamRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamRefV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "team-already-exists": {
                    "summary": "The team already exists.",
                    "description": "Another team of the workspace carries the name.",
                    "value": {
                      "type": "/core/$problems/team-already-exists",
                      "title": "The team already exists.",
                      "status": 409,
                      "name": "Payroll",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.workspaces"
            ]
          }
        ]
      }
    },
    "/core/workspaces/v1-preview/teams/delete": {
      "post": {
        "tags": [
          "Workspaces · V1 Preview · Teams"
        ],
        "summary": "Delete team",
        "description": "Deletes a team of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Roles** `required` — one of: `Owner` | `Administrator`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteTeamRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "team-not-found": {
                    "summary": "The team is not found.",
                    "description": "The identifier matched no team of the workspace.",
                    "value": {
                      "type": "/core/$problems/team-not-found",
                      "title": "The team is not found.",
                      "status": 422,
                      "teamId": "c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "team-not-empty": {
                    "summary": "The team still has members or client assignments.",
                    "description": "The team cannot be deleted while members belong to it or clients are assigned to it unless `force` is set.",
                    "value": {
                      "type": "/core/$problems/team-not-empty",
                      "title": "The team still has members or client assignments.",
                      "status": 409,
                      "teamId": "c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47",
                      "memberCount": 4,
                      "clientCount": 12,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.workspaces"
            ]
          }
        ]
      }
    },
    "/core/workspaces/v1-preview/teams/get-by-id": {
      "post": {
        "tags": [
          "Workspaces · V1 Preview · Teams"
        ],
        "summary": "Get team by id",
        "description": "Returns a team of the caller's workspace by its unique identifier.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Roles** `required` — one of: `Owner` | `Administrator` | `Member`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetTeamByIdRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "team-not-found": {
                    "summary": "The team is not found.",
                    "description": "The identifier matched no team of the workspace.",
                    "value": {
                      "type": "/core/$problems/team-not-found",
                      "title": "The team is not found.",
                      "status": 422,
                      "teamId": "c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.workspaces"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.workspaces"
            ]
          }
        ]
      }
    },
    "/core/workspaces/v1-preview/teams/list": {
      "post": {
        "tags": [
          "Workspaces · V1 Preview · Teams"
        ],
        "summary": "List teams",
        "description": "Lists the teams of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Roles** `required` — one of: `Owner` | `Administrator` | `Member`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListTeamsRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamsV1"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "read:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "read:core.workspaces"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.workspaces"
            ]
          }
        ]
      }
    },
    "/core/workspaces/v1-preview/teams/remove-members": {
      "post": {
        "tags": [
          "Workspaces · V1 Preview · Teams"
        ],
        "summary": "Remove members from team",
        "description": "Removes workspace members from a team of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Roles** `required` — one of: `Owner` | `Administrator`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveMembersFromTeamRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "team-not-found": {
                    "summary": "The team is not found.",
                    "description": "The identifier matched no team of the workspace.",
                    "value": {
                      "type": "/core/$problems/team-not-found",
                      "title": "The team is not found.",
                      "status": 422,
                      "teamId": "c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "unknown-members": {
                    "summary": "Some users are not accepted workspace members.",
                    "value": {
                      "type": "/core/$problems/unknown-members",
                      "title": "Some users are not accepted workspace members.",
                      "status": 422,
                      "userIds": [
                        "3a6f0b18-9c2d-4e75-b103-8f4a5c6d7e29",
                        "e8d7c6b5-4a39-4210-9f8e-7d6c5b4a3f21"
                      ],
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.workspaces"
            ]
          }
        ]
      }
    },
    "/core/workspaces/v1-preview/teams/rename": {
      "post": {
        "tags": [
          "Workspaces · V1 Preview · Teams"
        ],
        "summary": "Rename team",
        "description": "Renames a team of the caller's workspace.\n\n> [!note]\n> **User** `optional` — machine callers are exempt\n> - **Roles** `required` — one of: `Owner` | `Administrator`",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameTeamRequestV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                },
                "examples": {
                  "validation": {
                    "summary": "One or more validation errors occurred.",
                    "description": "Every offending value is keyed by its JSON path.",
                    "value": {
                      "type": "/core/$problems/validation",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "<property.path>": [
                          "The value is invalid."
                        ],
                        "<array.property.path>[1]": [
                          "The array item is invalid."
                        ]
                      },
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.4",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "<what the operation demanded: a user token, a covering scope, or a workspace role or permission>",
                  "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "team-not-found": {
                    "summary": "The team is not found.",
                    "description": "The identifier matched no team of the workspace.",
                    "value": {
                      "type": "/core/$problems/team-not-found",
                      "title": "The team is not found.",
                      "status": 422,
                      "teamId": "c41d8f6a-2b95-4703-8e6c-9d0a1b2f3e47",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  },
                  "workspace-not-found": {
                    "summary": "The tenant has no workspace.",
                    "value": {
                      "type": "/core/$problems/workspace-not-found",
                      "title": "The tenant has no workspace.",
                      "status": 422,
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "team-already-exists": {
                    "summary": "The team already exists.",
                    "description": "Another team of the workspace carries the name.",
                    "value": {
                      "type": "/core/$problems/team-already-exists",
                      "title": "The team already exists.",
                      "status": 409,
                      "name": "Payroll",
                      "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2-Client-Credentials": [
              "manage:core"
            ]
          },
          {
            "OAuth2-Client-Credentials": [
              "manage:core.workspaces"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AddClientRelationsRequestV1": {
        "required": [
          "id",
          "targetId",
          "roles"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "targetId": {
            "type": "string",
            "description": "The related client unique identifier.",
            "format": "uuid"
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientRelationRoleV1"
            },
            "description": "The relation roles to add;\neach is mirrored on the related client with the opposite role."
          },
          "period": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The optional relation period applied to every added relation.",
                "$ref": "#/components/schemas/ClientRelationPeriodV1"
              }
            ]
          }
        },
        "description": "Represents an object that requests adding relations from a client to another client."
      },
      "AddClientsToGroupRequestV1": {
        "required": [
          "id",
          "clientIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client group unique identifier.",
            "format": "uuid"
          },
          "clientIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The unique identifiers of the clients to add to the group."
          }
        },
        "description": "Represents an object that requests adding clients to a client group."
      },
      "AddMembersToTeamRequestV1": {
        "required": [
          "id",
          "userIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team unique identifier.",
            "format": "uuid"
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The unique identifiers of the users whose workspace members to add to the team."
          }
        },
        "description": "Represents an object that requests adding workspace members to a team."
      },
      "AddressV1": {
        "required": [
          "area",
          "locality",
          "line1"
        ],
        "type": "object",
        "properties": {
          "area": {
            "examples": [
              "AU-NSW"
            ],
            "type": "string",
            "description": "The country subdivision code, in the *ISO 3166-2* form."
          },
          "locality": {
            "examples": [
              "Sydney"
            ],
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "The locality (the suburb, town or city)."
          },
          "postCode": {
            "examples": [
              "2000"
            ],
            "maxLength": 10,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The postcode."
          },
          "line1": {
            "examples": [
              "Level 5, 1 Martin Place"
            ],
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "The first address line."
          },
          "line2": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The second address line."
          }
        },
        "description": "Represents a postal address."
      },
      "AnzsicCodeChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "examples": [
              "69100"
            ],
            "pattern": "^[0-9]{5}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired change of an\n*Australian and New Zealand Standard Industrial Classification (ANZSIC)* code."
      },
      "AnzsicInfoV1": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "examples": [
              "69100"
            ],
            "type": "string",
            "description": "The *ANZSIC* code, as five digits."
          },
          "description": {
            "examples": [
              "Legal Services"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "The classified business activity description."
          }
        },
        "description": "Represents an object providing information about an\n*Australian and New Zealand Standard Industrial Classification (ANZSIC)* code."
      },
      "AssignMembersToClientRequestV1": {
        "required": [
          "id",
          "userIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The unique identifiers of the users whose workspace members to assign to the client.\nAn already assigned member is left untouched, its client owner flag included."
          }
        },
        "description": "Represents an object that requests assigning workspace members to a client."
      },
      "AssignTeamsToClientRequestV1": {
        "required": [
          "id",
          "teamIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "teamIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The unique identifiers of the workspace teams to assign to the client."
          }
        },
        "description": "Represents an object that requests assigning workspace teams to a client."
      },
      "BusinessNumberChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired change of an *Australian Business Number (ABN)*."
      },
      "ChangeReport": {
        "required": [
          "changed"
        ],
        "type": "object",
        "properties": {
          "changed": {
            "type": "boolean",
            "description": "Whether the change actually applied; `false` when the target already was in the requested state."
          }
        },
        "description": "Represents the outcome of a requested change."
      },
      "ClientAddressesChangeSetV1Individual": {
        "type": "object",
        "properties": {
          "residential": {
            "examples": [
              {
                "value": {
                  "area": "AU-NSW",
                  "locality": "Bondi",
                  "postCode": "2026",
                  "line1": "12 Campbell Parade",
                  "line2": "Apartment 3"
                }
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The residential address change.",
                "examples": [
                  {
                    "value": {
                      "area": "AU-NSW",
                      "locality": "Bondi",
                      "postCode": "2026",
                      "line1": "12 Campbell Parade",
                      "line2": "Apartment 3"
                    }
                  }
                ],
                "$ref": "#/components/schemas/ValueChangeOfAddressV1"
              }
            ]
          },
          "business": {
            "examples": [
              {
                "value": {
                  "area": "AU-NSW",
                  "locality": "Sydney",
                  "postCode": "2000",
                  "line1": "Level 5, 1 Martin Place",
                  "line2": null
                }
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The business address change.",
                "examples": [
                  {
                    "value": {
                      "area": "AU-NSW",
                      "locality": "Sydney",
                      "postCode": "2000",
                      "line1": "Level 5, 1 Martin Place",
                      "line2": null
                    }
                  }
                ],
                "$ref": "#/components/schemas/ValueChangeOfAddressV1"
              }
            ]
          },
          "postal": {
            "examples": [
              {
                "value": {
                  "area": "AU-NSW",
                  "locality": "Sydney",
                  "postCode": "2001",
                  "line1": "GPO Box 1234",
                  "line2": null
                }
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The postal address change.",
                "examples": [
                  {
                    "value": {
                      "area": "AU-NSW",
                      "locality": "Sydney",
                      "postCode": "2001",
                      "line1": "GPO Box 1234",
                      "line2": null
                    }
                  }
                ],
                "$ref": "#/components/schemas/ValueChangeOfAddressV1"
              }
            ]
          },
          "others": {
            "examples": [
              {
                "value": [
                  {
                    "area": "AU-NSW",
                    "locality": "Newcastle",
                    "postCode": "2300",
                    "line1": "7 Rental Avenue",
                    "line2": null
                  }
                ]
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The custom addresses change; the list replaces the stored custom addresses as a whole,\nand an address matching a stored one field by field is kept as it is.",
                "examples": [
                  {
                    "value": [
                      {
                        "area": "AU-NSW",
                        "locality": "Newcastle",
                        "postCode": "2300",
                        "line1": "7 Rental Avenue",
                        "line2": null
                      }
                    ]
                  }
                ],
                "$ref": "#/components/schemas/ValueChangeOfIReadOnlyCollectionOfAddressV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of individual addresses."
      },
      "ClientAddressesChangeSetV1Organization": {
        "type": "object",
        "properties": {
          "business": {
            "examples": [
              {
                "value": {
                  "area": "AU-NSW",
                  "locality": "Sydney",
                  "postCode": "2000",
                  "line1": "Level 5, 1 Martin Place",
                  "line2": null
                }
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The business address change.",
                "examples": [
                  {
                    "value": {
                      "area": "AU-NSW",
                      "locality": "Sydney",
                      "postCode": "2000",
                      "line1": "Level 5, 1 Martin Place",
                      "line2": null
                    }
                  }
                ],
                "$ref": "#/components/schemas/ValueChangeOfAddressV1"
              }
            ]
          },
          "postal": {
            "examples": [
              {
                "value": {
                  "area": "AU-NSW",
                  "locality": "Sydney",
                  "postCode": "2001",
                  "line1": "GPO Box 1234",
                  "line2": null
                }
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The postal address change.",
                "examples": [
                  {
                    "value": {
                      "area": "AU-NSW",
                      "locality": "Sydney",
                      "postCode": "2001",
                      "line1": "GPO Box 1234",
                      "line2": null
                    }
                  }
                ],
                "$ref": "#/components/schemas/ValueChangeOfAddressV1"
              }
            ]
          },
          "others": {
            "examples": [
              {
                "value": [
                  {
                    "area": "AU-NSW",
                    "locality": "Newcastle",
                    "postCode": "2300",
                    "line1": "7 Rental Avenue",
                    "line2": null
                  }
                ]
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The custom addresses change; the list replaces the stored custom addresses as a whole,\nand an address matching a stored one field by field is kept as it is.",
                "examples": [
                  {
                    "value": [
                      {
                        "area": "AU-NSW",
                        "locality": "Newcastle",
                        "postCode": "2300",
                        "line1": "7 Rental Avenue",
                        "line2": null
                      }
                    ]
                  }
                ],
                "$ref": "#/components/schemas/ValueChangeOfIReadOnlyCollectionOfAddressV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of organization addresses."
      },
      "ClientAddressesV1Individual": {
        "type": "object",
        "properties": {
          "residential": {
            "examples": [
              {
                "area": "AU-NSW",
                "locality": "Bondi",
                "postCode": "2026",
                "line1": "12 Campbell Parade",
                "line2": "Apartment 3"
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The residential address.",
                "examples": [
                  {
                    "area": "AU-NSW",
                    "locality": "Bondi",
                    "postCode": "2026",
                    "line1": "12 Campbell Parade",
                    "line2": "Apartment 3"
                  }
                ],
                "$ref": "#/components/schemas/AddressV1"
              }
            ]
          },
          "business": {
            "examples": [
              {
                "area": "AU-NSW",
                "locality": "Sydney",
                "postCode": "2000",
                "line1": "Level 5, 1 Martin Place",
                "line2": null
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The business address.",
                "examples": [
                  {
                    "area": "AU-NSW",
                    "locality": "Sydney",
                    "postCode": "2000",
                    "line1": "Level 5, 1 Martin Place",
                    "line2": null
                  }
                ],
                "$ref": "#/components/schemas/AddressV1"
              }
            ]
          },
          "postal": {
            "examples": [
              {
                "area": "AU-NSW",
                "locality": "Sydney",
                "postCode": "2001",
                "line1": "GPO Box 1234",
                "line2": null
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The postal address.",
                "examples": [
                  {
                    "area": "AU-NSW",
                    "locality": "Sydney",
                    "postCode": "2001",
                    "line1": "GPO Box 1234",
                    "line2": null
                  }
                ],
                "$ref": "#/components/schemas/AddressV1"
              }
            ]
          },
          "others": {
            "examples": [
              [
                {
                  "area": "AU-NSW",
                  "locality": "Newcastle",
                  "postCode": "2300",
                  "line1": "7 Rental Avenue",
                  "line2": null
                }
              ]
            ],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressV1"
            },
            "description": "The custom addresses, such as property addresses. On a profile replacement the list replaces\nthe stored custom addresses as a whole; an address matching a stored one field by field is kept as it is."
          }
        },
        "description": "Represents information about individual addresses."
      },
      "ClientAddressesV1Organization": {
        "type": "object",
        "properties": {
          "business": {
            "examples": [
              {
                "area": "AU-NSW",
                "locality": "Sydney",
                "postCode": "2000",
                "line1": "Level 5, 1 Martin Place",
                "line2": null
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The business address.",
                "examples": [
                  {
                    "area": "AU-NSW",
                    "locality": "Sydney",
                    "postCode": "2000",
                    "line1": "Level 5, 1 Martin Place",
                    "line2": null
                  }
                ],
                "$ref": "#/components/schemas/AddressV1"
              }
            ]
          },
          "postal": {
            "examples": [
              {
                "area": "AU-NSW",
                "locality": "Sydney",
                "postCode": "2001",
                "line1": "GPO Box 1234",
                "line2": null
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The postal address.",
                "examples": [
                  {
                    "area": "AU-NSW",
                    "locality": "Sydney",
                    "postCode": "2001",
                    "line1": "GPO Box 1234",
                    "line2": null
                  }
                ],
                "$ref": "#/components/schemas/AddressV1"
              }
            ]
          },
          "others": {
            "examples": [
              [
                {
                  "area": "AU-NSW",
                  "locality": "Newcastle",
                  "postCode": "2300",
                  "line1": "7 Rental Avenue",
                  "line2": null
                }
              ]
            ],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressV1"
            },
            "description": "The custom addresses, such as property addresses. On a profile replacement the list replaces\nthe stored custom addresses as a whole; an address matching a stored one field by field is kept as it is."
          }
        },
        "description": "Represents information about organization addresses."
      },
      "ClientAssignedMemberInfoV1": {
        "required": [
          "userId",
          "isClientOwner"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The unique identifier of the assigned user.",
            "format": "uuid"
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The first name of the assigned user."
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The last name of the assigned user."
          },
          "isClientOwner": {
            "type": "boolean",
            "description": "Whether the assigned user is the client owner:\nthe workspace member responsible for the client,\ndistinct from the workspace owner role."
          }
        },
        "description": "Represents an object that provides information about a workspace member assigned to a client."
      },
      "ClientAssignedTeamInfoV1": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team unique identifier.",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "The team name."
          }
        },
        "description": "Represents an object that provides information about a workspace team assigned to a client."
      },
      "ClientAssignmentsV1": {
        "type": "object",
        "properties": {
          "members": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientAssignedMemberInfoV1"
            },
            "description": "The workspace members assigned to the client,\nor `null` when members were not requested."
          },
          "teams": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientAssignedTeamInfoV1"
            },
            "description": "The workspace teams assigned to the client,\nor `null` when teams were not requested."
          }
        },
        "description": "Represents the workspace members and teams assigned to a client."
      },
      "ClientContactDetailsChangeSetV1Individual": {
        "type": "object",
        "properties": {
          "addresses": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The changes of the addresses.",
                "$ref": "#/components/schemas/ClientAddressesChangeSetV1Individual"
              }
            ]
          },
          "emailAddresses": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The email addresses change.",
                "$ref": "#/components/schemas/EmailAddressesChangeV1"
              }
            ]
          },
          "phoneNumbers": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The changes of the phone numbers.",
                "$ref": "#/components/schemas/ClientPhoneNumbersChangeSetV1"
              }
            ]
          },
          "webAddress": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The web address change.",
                "$ref": "#/components/schemas/WebAddressChangeV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of individual contact details."
      },
      "ClientContactDetailsChangeSetV1Organization": {
        "type": "object",
        "properties": {
          "addresses": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The changes of the addresses.",
                "$ref": "#/components/schemas/ClientAddressesChangeSetV1Organization"
              }
            ]
          },
          "emailAddresses": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The email addresses change.",
                "$ref": "#/components/schemas/EmailAddressesChangeV1"
              }
            ]
          },
          "phoneNumbers": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The changes of the phone numbers.",
                "$ref": "#/components/schemas/ClientPhoneNumbersChangeSetV1"
              }
            ]
          },
          "webAddress": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The web address change.",
                "$ref": "#/components/schemas/WebAddressChangeV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of organization contact details."
      },
      "ClientContactDetailsV1Individual": {
        "type": "object",
        "properties": {
          "addresses": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The information about individual addresses.",
                "$ref": "#/components/schemas/ClientAddressesV1Individual"
              }
            ]
          },
          "emailAddresses": {
            "examples": [
              [
                "jane.doe@example.com"
              ]
            ],
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^(?=[^@]{1,64}@)(?=.{1,254}$)[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]+(?:\\.[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]+)*@(?:[0-9A-Za-z](?:[0-9A-Za-z-]*[0-9A-Za-z])?\\.)+[0-9A-Za-z](?:[0-9A-Za-z-]*[0-9A-Za-z])?$",
              "type": "string"
            },
            "description": "The list of client email addresses.\nThe first one in the list is considered primary."
          },
          "phoneNumbers": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The information about client phone numbers.",
                "$ref": "#/components/schemas/ClientPhoneNumbersV1"
              }
            ]
          },
          "webAddress": {
            "examples": [
              "www.example.com"
            ],
            "maxLength": 50,
            "minLength": 0,
            "pattern": "^(?=.{1,2048}$)(?:[Hh][Tt][Tt][Pp][Ss]?://)?(?=[-.0-9A-Za-z]{1,253}(?:[:/?#]|$))(?:[0-9A-Za-z](?:[0-9A-Za-z-]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z](?:[0-9A-Za-z-]{0,61}[0-9A-Za-z])(?::(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}))?(?:[/?#][-0-9A-Za-z._~%!$&'()*+,;=:@/?#\\[\\]]*)?$",
            "type": [
              "null",
              "string"
            ],
            "description": "The web address of the client site."
          }
        },
        "description": "Represents contact details of an individual."
      },
      "ClientContactDetailsV1Organization": {
        "type": "object",
        "properties": {
          "addresses": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The information about organization addresses.",
                "$ref": "#/components/schemas/ClientAddressesV1Organization"
              }
            ]
          },
          "emailAddresses": {
            "examples": [
              [
                "jane.doe@example.com"
              ]
            ],
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^(?=[^@]{1,64}@)(?=.{1,254}$)[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]+(?:\\.[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]+)*@(?:[0-9A-Za-z](?:[0-9A-Za-z-]*[0-9A-Za-z])?\\.)+[0-9A-Za-z](?:[0-9A-Za-z-]*[0-9A-Za-z])?$",
              "type": "string"
            },
            "description": "The list of client email addresses.\nThe first one in the list is considered primary."
          },
          "phoneNumbers": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The information about client phone numbers.",
                "$ref": "#/components/schemas/ClientPhoneNumbersV1"
              }
            ]
          },
          "webAddress": {
            "examples": [
              "www.example.com"
            ],
            "maxLength": 50,
            "minLength": 0,
            "pattern": "^(?=.{1,2048}$)(?:[Hh][Tt][Tt][Pp][Ss]?://)?(?=[-.0-9A-Za-z]{1,253}(?:[:/?#]|$))(?:[0-9A-Za-z](?:[0-9A-Za-z-]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z](?:[0-9A-Za-z-]{0,61}[0-9A-Za-z])(?::(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}))?(?:[/?#][-0-9A-Za-z._~%!$&'()*+,;=:@/?#\\[\\]]*)?$",
            "type": [
              "null",
              "string"
            ],
            "description": "The web address of the client site."
          }
        },
        "description": "Represents contact details of an organization."
      },
      "ClientCountV1": {
        "required": [
          "count"
        ],
        "type": "object",
        "properties": {
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The number of clients matching the request.",
            "format": "int32"
          }
        },
        "description": "Represents a count of clients."
      },
      "ClientExpansionPathV1": {
        "enum": [
          "*",
          "**",
          "profile",
          "profile.*",
          "profile.**",
          "profile.contacts",
          "profile.contacts.*",
          "profile.contacts.addresses",
          "profile.contacts.emailAddresses",
          "profile.contacts.phoneNumbers",
          "assignments.*",
          "assignments.members",
          "assignments.teams",
          "groups",
          "relations"
        ],
        "description": "An enumeration of the client expansion paths: dotted paths into the client, naming the parts to return beyond its own fields.\nA node returns its own fields; its sub-objects and collections are expanded only when named. Naming a path also expands its ancestors.\nA trailing `*` expands the node and its direct children; a trailing `**` expands the node and all its descendants,\nincluding the ones added later, and is offered only where the node has descendants beyond its direct children."
      },
      "ClientGroupRefV1": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client group unique identifier.",
            "format": "uuid"
          }
        },
        "description": "Represents a reference to a client group."
      },
      "ClientGroupsV1": {
        "required": [
          "groups"
        ],
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientGroupV1"
            },
            "description": "The client groups."
          }
        },
        "description": "Represents an object that provides the client groups of a workspace."
      },
      "ClientGroupV1": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client group unique identifier.",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "The client group name."
          }
        },
        "description": "Represents an object that provides information about a client group."
      },
      "ClientPageV1": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientV1"
            }
          },
          "nextPageToken": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Represents a single page of workspace clients."
      },
      "ClientPagingArgsV1": {
        "type": "object",
        "properties": {
          "size": {
            "examples": [
              100
            ],
            "maximum": 500,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The size of the page to return, or `null` for the default size.",
            "format": "int32"
          },
          "token": {
            "type": [
              "null",
              "string"
            ],
            "description": "The opaque token of the page to return, as issued by the previous response,\nor `null` for the first page."
          }
        },
        "description": "Represents the paging arguments of a request for a page of clients."
      },
      "ClientPhoneNumbersChangeSetV1": {
        "type": "object",
        "properties": {
          "faxes": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The fax numbers change.",
                "$ref": "#/components/schemas/PhoneNumbersChangeV1"
              }
            ]
          },
          "mobiles": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The mobile numbers change.",
                "$ref": "#/components/schemas/PhoneNumbersChangeV1"
              }
            ]
          },
          "others": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The other phone numbers change.",
                "$ref": "#/components/schemas/PhoneNumbersChangeV1"
              }
            ]
          },
          "primary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The primary phone number change.",
                "$ref": "#/components/schemas/PhoneNumberChangeV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of client phone numbers."
      },
      "ClientPhoneNumbersV1": {
        "type": "object",
        "properties": {
          "faxes": {
            "examples": [
              [
                "+61299990000"
              ]
            ],
            "type": "array",
            "items": {
              "pattern": "^\\+[1-9][0-9]{6,14}$",
              "type": "string"
            },
            "description": "The fax numbers."
          },
          "mobiles": {
            "examples": [
              [
                "+61400000000"
              ]
            ],
            "type": "array",
            "items": {
              "pattern": "^\\+[1-9][0-9]{6,14}$",
              "type": "string"
            },
            "description": "The mobile phone numbers."
          },
          "others": {
            "examples": [
              [
                "+61399990000"
              ]
            ],
            "type": "array",
            "items": {
              "pattern": "^\\+[1-9][0-9]{6,14}$",
              "type": "string"
            },
            "description": "The others phone numbers."
          },
          "primary": {
            "examples": [
              "+61299990000"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The primary phone number."
          }
        },
        "description": "Represents an object that provides information about client phone numbers."
      },
      "ClientProfileChangeSetV1": {
        "required": [
          "type"
        ],
        "type": "object",
        "anyOf": [
          {
            "$ref": "#/components/schemas/ClientProfileChangeSetV1Individual"
          },
          {
            "$ref": "#/components/schemas/ClientProfileChangeSetV1Company"
          },
          {
            "$ref": "#/components/schemas/ClientProfileChangeSetV1Partnership"
          },
          {
            "$ref": "#/components/schemas/ClientProfileChangeSetV1Superfund"
          },
          {
            "$ref": "#/components/schemas/ClientProfileChangeSetV1Trust"
          }
        ],
        "description": "Provides types representing changesets of client profiles.",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "Individual": "#/components/schemas/ClientProfileChangeSetV1Individual",
            "Company": "#/components/schemas/ClientProfileChangeSetV1Company",
            "Partnership": "#/components/schemas/ClientProfileChangeSetV1Partnership",
            "Superfund": "#/components/schemas/ClientProfileChangeSetV1Superfund",
            "Trust": "#/components/schemas/ClientProfileChangeSetV1Trust"
          }
        }
      },
      "ClientProfileChangeSetV1Company": {
        "properties": {
          "type": {
            "enum": [
              "Company"
            ],
            "type": "string"
          },
          "acn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ACN change.",
                "$ref": "#/components/schemas/CompanyNumberChangeV1"
              }
            ]
          },
          "name": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The legal name change.",
                "$ref": "#/components/schemas/LegalNameChangeV1"
              }
            ]
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The changes of the contacts.",
                "$ref": "#/components/schemas/ClientContactDetailsChangeSetV1Organization"
              }
            ]
          },
          "abn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ABN change.",
                "$ref": "#/components/schemas/BusinessNumberChangeV1"
              }
            ]
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ANZSIC code change.",
                "$ref": "#/components/schemas/AnzsicCodeChangeV1"
              }
            ]
          },
          "tfn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The TFN change; ignored unless unlocked by `unlock:tfn`.",
                "$ref": "#/components/schemas/TaxFileNumberChangeV1"
              }
            ]
          },
          "tradingName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The trading name change.",
                "$ref": "#/components/schemas/TradingNameChangeV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of a company profile."
      },
      "ClientProfileChangeSetV1Individual": {
        "properties": {
          "type": {
            "enum": [
              "Individual"
            ],
            "type": "string"
          },
          "firstName": {
            "examples": [
              {
                "value": "John"
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The first name change.",
                "examples": [
                  {
                    "value": "John"
                  }
                ],
                "$ref": "#/components/schemas/PersonNameChangeV1"
              }
            ]
          },
          "middleName": {
            "examples": [
              {
                "value": "Michael"
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The middle name change.",
                "examples": [
                  {
                    "value": "Michael"
                  }
                ],
                "$ref": "#/components/schemas/OptionalPersonNameChangeV1"
              }
            ]
          },
          "lastName": {
            "examples": [
              {
                "value": "Doe"
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The last name change.",
                "examples": [
                  {
                    "value": "Doe"
                  }
                ],
                "$ref": "#/components/schemas/PersonNameChangeV1"
              }
            ]
          },
          "casualName": {
            "examples": [
              {
                "value": "Johnny"
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The casual name change.",
                "examples": [
                  {
                    "value": "Johnny"
                  }
                ],
                "$ref": "#/components/schemas/OptionalPersonNameChangeV1"
              }
            ]
          },
          "gender": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The gender change.",
                "$ref": "#/components/schemas/ValueChangeOfGenderV1"
              }
            ]
          },
          "birthDate": {
            "examples": [
              {
                "value": "1985-04-23"
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The birth date change; ignored unless unlocked by `unlock:dob`.",
                "examples": [
                  {
                    "value": "1985-04-23"
                  }
                ],
                "$ref": "#/components/schemas/ValueChangeOfDateOnly"
              }
            ]
          },
          "deathDate": {
            "examples": [
              {
                "value": null
              }
            ],
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The death date change.",
                "examples": [
                  {
                    "value": null
                  }
                ],
                "$ref": "#/components/schemas/ValueChangeOfDateOnly"
              }
            ]
          },
          "directorId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The director identification number change; ignored unless unlocked by `unlock:director-id`.",
                "$ref": "#/components/schemas/DirectorIdChangeV1"
              }
            ]
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The changes of the contacts.",
                "$ref": "#/components/schemas/ClientContactDetailsChangeSetV1Individual"
              }
            ]
          },
          "abn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ABN change.",
                "$ref": "#/components/schemas/BusinessNumberChangeV1"
              }
            ]
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ANZSIC code change.",
                "$ref": "#/components/schemas/AnzsicCodeChangeV1"
              }
            ]
          },
          "tfn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The TFN change; ignored unless unlocked by `unlock:tfn`.",
                "$ref": "#/components/schemas/TaxFileNumberChangeV1"
              }
            ]
          },
          "tradingName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The trading name change.",
                "$ref": "#/components/schemas/TradingNameChangeV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of an individual profile."
      },
      "ClientProfileChangeSetV1Partnership": {
        "properties": {
          "type": {
            "enum": [
              "Partnership"
            ],
            "type": "string"
          },
          "name": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The legal name change.",
                "$ref": "#/components/schemas/LegalNameChangeV1"
              }
            ]
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The changes of the contacts.",
                "$ref": "#/components/schemas/ClientContactDetailsChangeSetV1Organization"
              }
            ]
          },
          "abn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ABN change.",
                "$ref": "#/components/schemas/BusinessNumberChangeV1"
              }
            ]
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ANZSIC code change.",
                "$ref": "#/components/schemas/AnzsicCodeChangeV1"
              }
            ]
          },
          "tfn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The TFN change; ignored unless unlocked by `unlock:tfn`.",
                "$ref": "#/components/schemas/TaxFileNumberChangeV1"
              }
            ]
          },
          "tradingName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The trading name change.",
                "$ref": "#/components/schemas/TradingNameChangeV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of a partnership profile."
      },
      "ClientProfileChangeSetV1Superfund": {
        "properties": {
          "type": {
            "enum": [
              "Superfund"
            ],
            "type": "string"
          },
          "name": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The legal name change.",
                "$ref": "#/components/schemas/LegalNameChangeV1"
              }
            ]
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The changes of the contacts.",
                "$ref": "#/components/schemas/ClientContactDetailsChangeSetV1Organization"
              }
            ]
          },
          "abn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ABN change.",
                "$ref": "#/components/schemas/BusinessNumberChangeV1"
              }
            ]
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ANZSIC code change.",
                "$ref": "#/components/schemas/AnzsicCodeChangeV1"
              }
            ]
          },
          "tfn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The TFN change; ignored unless unlocked by `unlock:tfn`.",
                "$ref": "#/components/schemas/TaxFileNumberChangeV1"
              }
            ]
          },
          "tradingName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The trading name change.",
                "$ref": "#/components/schemas/TradingNameChangeV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of a superfund profile."
      },
      "ClientProfileChangeSetV1Trust": {
        "properties": {
          "type": {
            "enum": [
              "Trust"
            ],
            "type": "string"
          },
          "name": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The legal name change.",
                "$ref": "#/components/schemas/LegalNameChangeV1"
              }
            ]
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The changes of the contacts.",
                "$ref": "#/components/schemas/ClientContactDetailsChangeSetV1Organization"
              }
            ]
          },
          "abn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ABN change.",
                "$ref": "#/components/schemas/BusinessNumberChangeV1"
              }
            ]
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The ANZSIC code change.",
                "$ref": "#/components/schemas/AnzsicCodeChangeV1"
              }
            ]
          },
          "tfn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The TFN change; ignored unless unlocked by `unlock:tfn`.",
                "$ref": "#/components/schemas/TaxFileNumberChangeV1"
              }
            ]
          },
          "tradingName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The trading name change.",
                "$ref": "#/components/schemas/TradingNameChangeV1"
              }
            ]
          }
        },
        "description": "Represents a changeset of a trust profile."
      },
      "ClientProfileInfoV1": {
        "required": [
          "type"
        ],
        "type": "object",
        "anyOf": [
          {
            "$ref": "#/components/schemas/ClientProfileInfoV1Individual"
          },
          {
            "$ref": "#/components/schemas/ClientProfileInfoV1Company"
          },
          {
            "$ref": "#/components/schemas/ClientProfileInfoV1Partnership"
          },
          {
            "$ref": "#/components/schemas/ClientProfileInfoV1Superfund"
          },
          {
            "$ref": "#/components/schemas/ClientProfileInfoV1Trust"
          }
        ],
        "description": "Provides types representing client profile projections.",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "Individual": "#/components/schemas/ClientProfileInfoV1Individual",
            "Company": "#/components/schemas/ClientProfileInfoV1Company",
            "Partnership": "#/components/schemas/ClientProfileInfoV1Partnership",
            "Superfund": "#/components/schemas/ClientProfileInfoV1Superfund",
            "Trust": "#/components/schemas/ClientProfileInfoV1Trust"
          }
        }
      },
      "ClientProfileInfoV1Company": {
        "required": [
          "name"
        ],
        "properties": {
          "type": {
            "enum": [
              "Company"
            ],
            "type": "string"
          },
          "acn": {
            "examples": [
              "004085616"
            ],
            "pattern": "^[0-9]{9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Company Number (ACN)*."
          },
          "name": {
            "type": "string",
            "description": "The legal name."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Organization"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* of the main business activity.",
                "$ref": "#/components/schemas/AnzsicInfoV1"
              }
            ]
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; present only when unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents a company profile projection."
      },
      "ClientProfileInfoV1Individual": {
        "required": [
          "firstName",
          "lastName"
        ],
        "properties": {
          "type": {
            "enum": [
              "Individual"
            ],
            "type": "string"
          },
          "firstName": {
            "examples": [
              "John"
            ],
            "type": "string",
            "description": "The first name."
          },
          "middleName": {
            "examples": [
              "Michael"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "The middle name."
          },
          "lastName": {
            "examples": [
              "Doe"
            ],
            "type": "string",
            "description": "The last name."
          },
          "casualName": {
            "examples": [
              "Johnny"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "The casual name or nickname."
          },
          "gender": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The gender.",
                "$ref": "#/components/schemas/GenderV1"
              }
            ]
          },
          "birthDate": {
            "examples": [
              "1985-04-23"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "The birthdate; present only when unlocked by `unlock:dob`.",
            "format": "date"
          },
          "deathDate": {
            "examples": [
              null
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "The date of death.",
            "format": "date"
          },
          "directorId": {
            "examples": [
              "036123456789012"
            ],
            "pattern": "^036[0-9]{12}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Director Identification Number*; present only when unlocked by `unlock:director-id`."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Individual"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* of the main business activity.",
                "$ref": "#/components/schemas/AnzsicInfoV1"
              }
            ]
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; present only when unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents an individual profile projection."
      },
      "ClientProfileInfoV1Partnership": {
        "required": [
          "name"
        ],
        "properties": {
          "type": {
            "enum": [
              "Partnership"
            ],
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The legal name."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Organization"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* of the main business activity.",
                "$ref": "#/components/schemas/AnzsicInfoV1"
              }
            ]
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; present only when unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents a partnership profile projection."
      },
      "ClientProfileInfoV1Superfund": {
        "required": [
          "name"
        ],
        "properties": {
          "type": {
            "enum": [
              "Superfund"
            ],
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The legal name."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Organization"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* of the main business activity.",
                "$ref": "#/components/schemas/AnzsicInfoV1"
              }
            ]
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; present only when unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents a superfund profile projection."
      },
      "ClientProfileInfoV1Trust": {
        "required": [
          "name"
        ],
        "properties": {
          "type": {
            "enum": [
              "Trust"
            ],
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The legal name."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Organization"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* of the main business activity.",
                "$ref": "#/components/schemas/AnzsicInfoV1"
              }
            ]
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; present only when unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents a trust profile projection."
      },
      "ClientProfileV1": {
        "required": [
          "type"
        ],
        "type": "object",
        "anyOf": [
          {
            "$ref": "#/components/schemas/ClientProfileV1Individual"
          },
          {
            "$ref": "#/components/schemas/ClientProfileV1Company"
          },
          {
            "$ref": "#/components/schemas/ClientProfileV1Partnership"
          },
          {
            "$ref": "#/components/schemas/ClientProfileV1Superfund"
          },
          {
            "$ref": "#/components/schemas/ClientProfileV1Trust"
          }
        ],
        "description": "Provides types representing client profiles.",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "Individual": "#/components/schemas/ClientProfileV1Individual",
            "Company": "#/components/schemas/ClientProfileV1Company",
            "Partnership": "#/components/schemas/ClientProfileV1Partnership",
            "Superfund": "#/components/schemas/ClientProfileV1Superfund",
            "Trust": "#/components/schemas/ClientProfileV1Trust"
          }
        }
      },
      "ClientProfileV1Company": {
        "required": [
          "name"
        ],
        "properties": {
          "type": {
            "enum": [
              "Company"
            ],
            "type": "string"
          },
          "acn": {
            "examples": [
              "004085616"
            ],
            "pattern": "^[0-9]{9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Company Number (ACN)*."
          },
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "The legal name."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Organization"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "examples": [
              "69100"
            ],
            "pattern": "^[0-9]{5}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* code\nof the main business activity, as five digits."
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; ignored unless unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents a company profile."
      },
      "ClientProfileV1Individual": {
        "required": [
          "firstName",
          "lastName"
        ],
        "properties": {
          "type": {
            "enum": [
              "Individual"
            ],
            "type": "string"
          },
          "firstName": {
            "examples": [
              "John"
            ],
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "The first name."
          },
          "middleName": {
            "examples": [
              "Michael"
            ],
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The middle name."
          },
          "lastName": {
            "examples": [
              "Doe"
            ],
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "The last name."
          },
          "casualName": {
            "examples": [
              "Johnny"
            ],
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The casual name or nickname."
          },
          "gender": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The gender.",
                "$ref": "#/components/schemas/GenderV1"
              }
            ]
          },
          "birthDate": {
            "examples": [
              "1985-04-23"
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "The birthdate; ignored unless unlocked by `unlock:dob`.",
            "format": "date"
          },
          "deathDate": {
            "examples": [
              null
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "The date of death.",
            "format": "date"
          },
          "directorId": {
            "examples": [
              "036123456789012"
            ],
            "pattern": "^036[0-9]{12}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Director Identification Number*; ignored unless unlocked by `unlock:director-id`."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Individual"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "examples": [
              "69100"
            ],
            "pattern": "^[0-9]{5}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* code\nof the main business activity, as five digits."
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; ignored unless unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents an individual profile."
      },
      "ClientProfileV1Partnership": {
        "required": [
          "name"
        ],
        "properties": {
          "type": {
            "enum": [
              "Partnership"
            ],
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "The legal name."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Organization"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "examples": [
              "69100"
            ],
            "pattern": "^[0-9]{5}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* code\nof the main business activity, as five digits."
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; ignored unless unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents a partnership profile."
      },
      "ClientProfileV1Superfund": {
        "required": [
          "name"
        ],
        "properties": {
          "type": {
            "enum": [
              "Superfund"
            ],
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "The legal name."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Organization"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "examples": [
              "69100"
            ],
            "pattern": "^[0-9]{5}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* code\nof the main business activity, as five digits."
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; ignored unless unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents a superfund profile."
      },
      "ClientProfileV1Trust": {
        "required": [
          "name"
        ],
        "properties": {
          "type": {
            "enum": [
              "Trust"
            ],
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "The legal name."
          },
          "contacts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The contact details.",
                "$ref": "#/components/schemas/ClientContactDetailsV1Organization"
              }
            ]
          },
          "abn": {
            "examples": [
              "51824753556"
            ],
            "pattern": "^[1-9][0-9]{10}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian Business Number (ABN)*."
          },
          "anzsic": {
            "examples": [
              "69100"
            ],
            "pattern": "^[0-9]{5}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Australian and New Zealand Standard Industrial Classification (ANZSIC)* code\nof the main business activity, as five digits."
          },
          "tfn": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The *Tax File Number (TFN)*; ignored unless unlocked by `unlock:tfn`."
          },
          "tradingName": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The trading name."
          }
        },
        "description": "Represents a trust profile."
      },
      "ClientRefV1": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          }
        },
        "description": "Represents a reference to a client."
      },
      "ClientRelationInfoV1": {
        "required": [
          "targetId",
          "role"
        ],
        "type": "object",
        "properties": {
          "targetId": {
            "type": "string",
            "description": "The related client unique identifier.",
            "format": "uuid"
          },
          "targetCode": {
            "type": [
              "null",
              "string"
            ],
            "description": "The custom code uniquely identifying a related client in a workspace."
          },
          "role": {
            "description": "The relation role.",
            "$ref": "#/components/schemas/ClientRelationRoleV1"
          },
          "period": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The relation period.",
                "$ref": "#/components/schemas/ClientRelationPeriodV1"
              }
            ]
          }
        },
        "description": "Represents an object providing information about a client relation to another client."
      },
      "ClientRelationPeriodV1": {
        "required": [
          "beganAt"
        ],
        "type": "object",
        "properties": {
          "beganAt": {
            "examples": [
              "2020-07-01"
            ],
            "type": "string",
            "description": "The date when the period began.",
            "format": "date"
          },
          "endedAt": {
            "examples": [
              null
            ],
            "type": [
              "null",
              "string"
            ],
            "description": "The date when the period ended, not earlier than `beganAt`. If `null`, the period is ongoing.",
            "format": "date"
          }
        },
        "description": "Represents a clients relation period."
      },
      "ClientRelationRolesV1": {
        "required": [
          "roles"
        ],
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientRelationRoleV1"
            },
            "description": "The relation roles, ordered by name."
          }
        },
        "description": "Represents an object that provides the relation roles possible between two clients."
      },
      "ClientRelationRoleV1": {
        "enum": [
          "Other",
          "AlternateDirector",
          "Appointer",
          "Associate",
          "Auditor",
          "Beneficiary",
          "ExSpouse",
          "ChildOf",
          "Director",
          "Member",
          "Owner",
          "ParentOf",
          "Partner",
          "Partnership",
          "PublicOfficer",
          "Secretary",
          "Sibling",
          "Shareholder",
          "Spouse",
          "Trust",
          "Trustee",
          "BeneficiaryOf",
          "PartnerOf",
          "DirectorOf",
          "AlternateDirectorOf",
          "AuditorOf",
          "MemberOf",
          "OwnerOf",
          "PublicOfficerOf",
          "ShareholderOf",
          "TrusteeOf",
          "AppointerOf",
          "SecretaryOf",
          "Settlor",
          "SettlorOf",
          "Employee",
          "EmployeeOf",
          "Referred",
          "ReferredBy",
          "AssociatedWith"
        ],
        "description": "An enumeration of client relation roles.",
        "x-enumDescriptions": {
          "Other": "Represents an unrecognized role; it may appear on existing relations but cannot be assigned.",
          "AlternateDirector": "Represents an alternate director.",
          "Appointer": "Represents an appointer.",
          "Associate": "Represents a retired associate role; it may appear on existing relations but cannot be assigned.",
          "Auditor": "Represents an auditor.",
          "Beneficiary": "Represents a beneficiary.",
          "ExSpouse": "Represents an ex-spouse.",
          "ChildOf": "Represents a child of the related client.",
          "Director": "Represents a director.",
          "Member": "Represents a member.",
          "Owner": "Represents an owner.",
          "ParentOf": "Represents a parent of the related client.",
          "Partner": "Represents a partner.",
          "Partnership": "Represents a retired partnership role; it may appear on existing relations but cannot be assigned.",
          "PublicOfficer": "Represents a public officer.",
          "Secretary": "Represents a secretary.",
          "Sibling": "Represents a sibling.",
          "Shareholder": "Represents a shareholder.",
          "Spouse": "Represents a spouse.",
          "Trust": "Represents a retired trust role; it may appear on existing relations but cannot be assigned.",
          "Trustee": "Represents a trustee.",
          "BeneficiaryOf": "Represents an entity the client is a beneficiary of.",
          "PartnerOf": "Represents an entity the client is a partner of.",
          "DirectorOf": "Represents an entity the client is a director of.",
          "AlternateDirectorOf": "Represents an entity the client is an alternate director of.",
          "AuditorOf": "Represents an entity the client is an auditor of.",
          "MemberOf": "Represents an entity the client is a member of.",
          "OwnerOf": "Represents an entity the client is an owner of.",
          "PublicOfficerOf": "Represents an entity the client is a public officer of.",
          "ShareholderOf": "Represents an entity the client is a shareholder of.",
          "TrusteeOf": "Represents an entity the client is a trustee of.",
          "AppointerOf": "Represents an entity the client is an appointer of.",
          "SecretaryOf": "Represents an entity the client is a secretary of.",
          "Settlor": "Represents a settlor.",
          "SettlorOf": "Represents an entity the client is a settlor of.",
          "Employee": "Represents an employee.",
          "EmployeeOf": "Represents an entity the client is an employee of.",
          "Referred": "Represents a referred client.",
          "ReferredBy": "Represents the client that referred the related client.",
          "AssociatedWith": "Represents a generic association with no more specific role."
        }
      },
      "ClientV1": {
        "required": [
          "id",
          "archived",
          "private",
          "profile"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "code": {
            "type": [
              "null",
              "string"
            ],
            "description": "The custom code referencing the client in an external system."
          },
          "archived": {
            "type": "boolean",
            "description": "Whether the client is archived."
          },
          "private": {
            "type": "boolean",
            "description": "Whether the client is private:\nvisible only to the workspace owners and the assigned members and teams."
          },
          "profile": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The object providing the client profile, or `null` when the profile was not requested.\nA personal field is present only when its unlock scope is granted.",
                "$ref": "#/components/schemas/ClientProfileInfoV1"
              }
            ]
          },
          "assignments": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The workspace members and teams assigned to the client,\nor `null` when neither was requested.",
                "$ref": "#/components/schemas/ClientAssignmentsV1"
              }
            ]
          },
          "groups": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientGroupV1"
            },
            "description": "The client groups the client belongs to,\nor `null` when groups were not requested."
          },
          "relations": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientRelationInfoV1"
            },
            "description": "The client relations to other clients,\nor `null` when relations were not requested."
          }
        },
        "description": "Represents an object that provides information about a client."
      },
      "CompanyNumberChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "examples": [
              "004085616"
            ],
            "pattern": "^[0-9]{9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired change of an *Australian Company Number (ACN)*."
      },
      "CountClientsRequestV1": {
        "type": "object",
        "properties": {
          "archived": {
            "type": [
              "null",
              "boolean"
            ],
            "description": "The archived flag filter:\nif `true`, counts archived clients only;\nif `false` - counts non-archived clients only;\nif `null` (default) - counts both."
          }
        },
        "description": "Represents an object that requests a count of clients."
      },
      "CreateClientGroupRequestV1": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "The name of the client group to create."
          }
        },
        "description": "Represents an object that requests a client group creation."
      },
      "CreateClientRequestV1": {
        "required": [
          "profile"
        ],
        "type": "object",
        "properties": {
          "code": {
            "maxLength": 30,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The custom code referencing the client in an external system;\nmust be unique within the workspace."
          },
          "private": {
            "type": "boolean",
            "description": "Whether to create the client as private:\nvisible only to the workspace owners and the assigned members and teams."
          },
          "profile": {
            "description": "The object providing the client profile.",
            "$ref": "#/components/schemas/ClientProfileV1"
          }
        },
        "description": "Represents an object that requests a client creation."
      },
      "CreateTeamRequestV1": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "description": "The name of the team to create; must be unique within the workspace."
          }
        },
        "description": "Represents an object that requests a team creation."
      },
      "DeleteClientGroupRequestV1": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the client group to delete.",
            "format": "uuid"
          },
          "force": {
            "type": "boolean",
            "description": "Whether the group is deleted along with its client memberships;\nwhen `false`, deleting a non-empty group is refused."
          }
        },
        "description": "Represents an object that requests a client group deletion."
      },
      "DeleteTeamRequestV1": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team unique identifier.",
            "format": "uuid"
          },
          "force": {
            "type": "boolean",
            "description": "Whether the team is deleted along with its memberships and client assignments;\nwhen `false`, deleting a team that has members or is assigned to clients is refused."
          }
        },
        "description": "Represents an object that requests a team deletion."
      },
      "DirectorIdChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "examples": [
              "036123456789012"
            ],
            "pattern": "^036[0-9]{12}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired change of a *Director Identification Number*."
      },
      "EmailAddressesChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "examples": [
              [
                "jane.doe@example.com"
              ]
            ],
            "type": "array",
            "items": {
              "pattern": "^(?=[^@]{1,64}@)(?=.{1,254}$)[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]+(?:\\.[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]+)*@(?:[0-9A-Za-z](?:[0-9A-Za-z-]*[0-9A-Za-z])?\\.)+[0-9A-Za-z](?:[0-9A-Za-z-]*[0-9A-Za-z])?$",
              "type": "string"
            },
            "description": "The new value to set. The list replaces the stored one as a whole,\nand the first address in it is considered primary."
          }
        },
        "description": "Represents a desired change of a list of email addresses."
      },
      "GenderV1": {
        "enum": [
          "Male",
          "Female",
          "Indeterminate",
          null
        ]
      },
      "GetClientByCodeRequestV1": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The custom code referencing the client in an external system; matched case-insensitively."
          },
          "expansion": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientExpansionPathV1"
            },
            "description": "The expansion paths, or `null` to expand nothing."
          }
        },
        "description": "Represents an object that requests a client by its custom code."
      },
      "GetClientByIdRequestV1": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "expansion": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientExpansionPathV1"
            },
            "description": "The expansion paths, or `null` to expand nothing."
          }
        },
        "description": "Represents an object that requests a client by its unique identifier."
      },
      "GetTeamByIdRequestV1": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team unique identifier.",
            "format": "uuid"
          },
          "expansion": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TeamExpansionPathV1"
            },
            "description": "The expansion paths, or `null` to expand nothing."
          }
        },
        "description": "Represents an object that requests a team by its unique identifier."
      },
      "LegalNameChangeV1": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired change of an organization legal name."
      },
      "ListClientsRequestV1": {
        "type": "object",
        "properties": {
          "archived": {
            "type": [
              "null",
              "boolean"
            ],
            "description": "The archived flag filter:\nif `true`, lists archived clients only;\nif `false` - lists non-archived clients only;\nif `null` (default) - lists both."
          },
          "expansion": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientExpansionPathV1"
            },
            "description": "The expansion paths, or `null` to expand nothing."
          },
          "paging": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The paging arguments, or `null` for the first page of the default size.",
                "$ref": "#/components/schemas/ClientPagingArgsV1"
              }
            ]
          }
        },
        "description": "Represents an object that requests a page of clients."
      },
      "ListMembersRequestV1": {
        "type": "object",
        "properties": {
          "archived": {
            "type": [
              "null",
              "boolean"
            ],
            "description": "The archived flag filter:\nif `true`, lists archived members only;\nif `false` - lists non-archived members only;\nif `null` (default) - lists both."
          }
        },
        "description": "Represents an object that requests the members of the caller's workspace."
      },
      "ListPossibleClientRelationRolesRequestV1": {
        "required": [
          "id",
          "targetId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "targetId": {
            "type": "string",
            "description": "The related client unique identifier.",
            "format": "uuid"
          }
        },
        "description": "Represents an object that requests the relation roles possible between two clients."
      },
      "ListTeamsRequestV1": {
        "type": "object",
        "properties": {
          "expansion": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TeamExpansionPathV1"
            },
            "description": "The expansion paths, or `null` to expand nothing."
          }
        },
        "description": "Represents an object that requests the teams of a workspace."
      },
      "ModifyClientProfileRequestV1": {
        "required": [
          "id",
          "profile"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "profile": {
            "description": "The object providing the changes to apply to the client profile.\nOnly the fields the changeset carries are overwritten.",
            "$ref": "#/components/schemas/ClientProfileChangeSetV1"
          }
        },
        "description": "Represents an object that requests a client profile modification."
      },
      "OptionalPersonNameChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set, or `null` to clear it."
          }
        },
        "description": "Represents a desired change of an optional person name part."
      },
      "PersonNameChangeV1": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired change of a mandatory person name part."
      },
      "PhoneNumberChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "examples": [
              "+61299990000"
            ],
            "pattern": "^\\+[1-9][0-9]{6,14}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired change of a phone number."
      },
      "PhoneNumbersChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "examples": [
              [
                "+61299990000"
              ]
            ],
            "type": "array",
            "items": {
              "pattern": "^\\+[1-9][0-9]{6,14}$",
              "type": "string"
            },
            "description": "The new value to set. The list replaces the stored one as a whole."
          }
        },
        "description": "Represents a desired change of a list of phone numbers."
      },
      "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"
            ]
          },
          "traceId": {
            "examples": [
              "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
            ],
            "type": "string",
            "description": "The identifier of the occurrence, in the W3C trace-context format; quote it when reporting a problem."
          }
        },
        "additionalProperties": {
          "description": "A member the problem type adds."
        },
        "description": "The error response, following RFC 9457. A problem carries further members of its own, naming the values involved: the `type` tells which ones, and the problem reference lists them."
      },
      "RemoveClientRelationRequestV1": {
        "required": [
          "id",
          "targetId",
          "role"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "targetId": {
            "type": "string",
            "description": "The related client unique identifier.",
            "format": "uuid"
          },
          "role": {
            "description": "The role of the relation to remove;\nthe opposite relation mirrored on the related client is removed as well.",
            "$ref": "#/components/schemas/ClientRelationRoleV1"
          }
        },
        "description": "Represents an object that requests removing a relation between two clients."
      },
      "RemoveClientsFromGroupRequestV1": {
        "required": [
          "id",
          "clientIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client group unique identifier.",
            "format": "uuid"
          },
          "clientIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The unique identifiers of the clients to remove from the group."
          }
        },
        "description": "Represents an object that requests removing clients from a client group."
      },
      "RemoveMembersFromTeamRequestV1": {
        "required": [
          "id",
          "userIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team unique identifier.",
            "format": "uuid"
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The unique identifiers of the users whose workspace members to remove from the team."
          }
        },
        "description": "Represents an object that requests removing workspace members from a team."
      },
      "RenameClientGroupRequestV1": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the client group to rename.",
            "format": "uuid"
          },
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "The new name of the client group."
          }
        },
        "description": "Represents an object that requests a client group rename."
      },
      "RenameTeamRequestV1": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team unique identifier.",
            "format": "uuid"
          },
          "name": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "description": "The new team name; must be unique within the workspace."
          }
        },
        "description": "Represents an object that requests a team rename."
      },
      "ReplaceClientProfileRequestV1": {
        "required": [
          "id",
          "profile"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "profile": {
            "description": "The object providing the client profile that replaces the current one.",
            "$ref": "#/components/schemas/ClientProfileV1"
          }
        },
        "description": "Represents an object that requests a client profile replacement."
      },
      "SetClientArchivedFlagRequestV1": {
        "required": [
          "id",
          "value"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "value": {
            "type": "boolean",
            "description": "The target archived flag value: `true` to archive the client, `false` to unarchive it."
          }
        },
        "description": "Represents an object that requests a client archived flag change."
      },
      "SetClientCodeRequestV1": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "code": {
            "maxLength": 30,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The custom code referencing the client in an external system,\nor `null` to clear it; must be unique within the workspace."
          }
        },
        "description": "Represents an object that requests a client code change."
      },
      "SetClientOwnerRequestV1": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The unique identifier of the user whose workspace member to make the client owner,\nor `null` to withdraw the current one, leaving the client without an owner.\nA user that is not assigned to the client yet is assigned to it as well.",
            "format": "uuid"
          }
        },
        "description": "Represents an object that requests setting the owner of a client."
      },
      "SetClientPrivateFlagRequestV1": {
        "required": [
          "id",
          "value"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "value": {
            "type": "boolean",
            "description": "The target private flag value: `true` to make the client private, `false` to make it public."
          }
        },
        "description": "Represents an object that requests a client private flag change."
      },
      "SetClientRelationPeriodRequestV1": {
        "required": [
          "id",
          "targetId",
          "role"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "targetId": {
            "type": "string",
            "description": "The related client unique identifier.",
            "format": "uuid"
          },
          "role": {
            "description": "The role of the relation to set the period on.",
            "$ref": "#/components/schemas/ClientRelationRoleV1"
          },
          "period": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The relation period to set, mirrored on the related client;\n`null` clears the period.",
                "$ref": "#/components/schemas/ClientRelationPeriodV1"
              }
            ]
          }
        },
        "description": "Represents an object that requests a client relation period change."
      },
      "TaxFileNumberChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "examples": [
              "123456782"
            ],
            "pattern": "^[0-9]{8,9}$",
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired change of a *Tax File Number (TFN)*."
      },
      "TeamExpansionPathV1": {
        "enum": [
          "*",
          "members"
        ],
        "description": "An enumeration of the team expansion paths: dotted paths into the team, naming the parts to return beyond its own fields.\nA node returns its own fields; its sub-objects and collections are expanded only when named.\nA trailing `*` expands the node and its direct children, including the ones added later."
      },
      "TeamRefV1": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team unique identifier.",
            "format": "uuid"
          }
        },
        "description": "Represents a reference to a team."
      },
      "TeamsV1": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamV1"
            },
            "description": "The teams."
          }
        },
        "description": "Represents an object that provides the teams of a workspace."
      },
      "TeamV1": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team unique identifier.",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "The team name."
          },
          "members": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/WorkspaceMemberInfoV1"
            },
            "description": "The team members, or `null` when members were not requested:\nthe workspace members who have joined, whether active or archived."
          }
        },
        "description": "Represents an object that provides information about a workspace team."
      },
      "TradingNameChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set, or `null` to clear it."
          }
        },
        "description": "Represents a desired change of a trading name."
      },
      "UnassignMembersFromClientRequestV1": {
        "required": [
          "id",
          "userIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The unique identifiers of the users whose workspace members to unassign from the client."
          }
        },
        "description": "Represents an object that requests unassigning workspace members from a client."
      },
      "UnassignTeamsFromClientRequestV1": {
        "required": [
          "id",
          "teamIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The client unique identifier.",
            "format": "uuid"
          },
          "teamIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The unique identifiers of the workspace teams to unassign from the client."
          }
        },
        "description": "Represents an object that requests unassigning workspace teams from a client."
      },
      "ValidationProblemDetails": {
        "examples": [
          {
            "type": "/core/$problems/validation",
            "title": "One or more validation errors occurred.",
            "status": 400,
            "errors": {
              "<property.path>": [
                "The value is invalid."
              ],
              "<array.property.path>[1]": [
                "The array item is invalid."
              ]
            },
            "traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
          }
        ],
        "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"
            ]
          },
          "traceId": {
            "examples": [
              "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
            ],
            "type": "string",
            "description": "The identifier of the occurrence, in the W3C trace-context format; quote it when reporting a problem."
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "additionalProperties": {
          "description": "A member the problem type adds."
        },
        "description": "The error response, following RFC 9457. A problem carries further members of its own, naming the values involved: the `type` tells which ones, and the problem reference lists them."
      },
      "ValueChangeOfAddressV1": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The new value to set.",
                "$ref": "#/components/schemas/AddressV1"
              }
            ]
          }
        },
        "description": "Represents a desired value change."
      },
      "ValueChangeOfDateOnly": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set.",
            "format": "date"
          }
        },
        "description": "Represents a desired value change."
      },
      "ValueChangeOfGenderV1": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The new value to set.",
                "$ref": "#/components/schemas/GenderV1"
              }
            ]
          }
        },
        "description": "Represents a desired value change."
      },
      "ValueChangeOfIReadOnlyCollectionOfAddressV1": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AddressV1"
            },
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired value change."
      },
      "WebAddressChangeV1": {
        "type": "object",
        "properties": {
          "value": {
            "examples": [
              "www.example.com"
            ],
            "maxLength": 50,
            "minLength": 0,
            "pattern": "^(?=.{1,2048}$)(?:[Hh][Tt][Tt][Pp][Ss]?://)?(?=[-.0-9A-Za-z]{1,253}(?:[:/?#]|$))(?:[0-9A-Za-z](?:[0-9A-Za-z-]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z](?:[0-9A-Za-z-]{0,61}[0-9A-Za-z])(?::(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}))?(?:[/?#][-0-9A-Za-z._~%!$&'()*+,;=:@/?#\\[\\]]*)?$",
            "type": [
              "null",
              "string"
            ],
            "description": "The new value to set."
          }
        },
        "description": "Represents a desired change of a web address."
      },
      "WorkspaceMemberInfoV1": {
        "required": [
          "userId",
          "emailAddress",
          "role",
          "archived"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The user unique identifier.",
            "format": "uuid"
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The first name."
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The last name."
          },
          "emailAddress": {
            "type": "string",
            "description": "The email address."
          },
          "role": {
            "description": "The role the member has in the workspace.",
            "$ref": "#/components/schemas/WorkspaceMemberRoleV1"
          },
          "archived": {
            "type": "boolean",
            "description": "Whether the membership is archived."
          }
        },
        "description": "Represents an object that provides information about a workspace member."
      },
      "WorkspaceMemberRoleV1": {
        "enum": [
          "Owner",
          "Administrator",
          "Member",
          "Collaborator"
        ],
        "description": "An enumeration of the roles a member can have in a workspace.",
        "x-enumDescriptions": {
          "Owner": "The member owns the workspace.",
          "Administrator": "The member can administer the workspace.",
          "Member": "The member has regular access to the workspace.",
          "Collaborator": "The member is external to the workspace and has been granted limited access."
        }
      },
      "WorkspaceMembersV1": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceMemberInfoV1"
            },
            "description": "The members."
          }
        },
        "description": "Represents an object that provides the members of a workspace."
      }
    },
    "securitySchemes": {
      "OAuth2-Client-Credentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://sso.lodgeit.com/connect/token",
            "scopes": {
              "read:core": "Read everything in Core",
              "manage:core": "Manage everything in Core",
              "read:core.clients": "Read clients",
              "manage:core.clients": "Manage clients",
              "read:core.workspaces": "Read workspace members and teams",
              "manage:core.workspaces": "Manage workspace members and teams",
              "unlock:dob": "Unlock dates of birth",
              "unlock:director-id": "Unlock director identification numbers",
              "unlock:tfn": "Unlock tax file numbers"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Clients · V1 Preview",
      "description": "The clients of a workspace - the individuals and organizations the work is done for - with their profiles, contact details, addresses, and codes."
    },
    {
      "name": "Clients · V1 Preview · Assignments",
      "description": "The members and the teams made responsible for a client."
    },
    {
      "name": "Clients · V1 Preview · Groups",
      "description": "The named groups the clients of a workspace are gathered into."
    },
    {
      "name": "Clients · V1 Preview · Relations",
      "description": "The roles the clients hold in one another, such as a director or a trustee, and the periods those roles last."
    },
    {
      "name": "Workspaces · V1 Preview",
      "description": "The workspaces and the members working in them, with their roles and permissions."
    },
    {
      "name": "Workspaces · V1 Preview · Teams",
      "description": "The teams of a workspace and the members belonging to them."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Clients",
      "tags": [
        "Clients · V1 Preview",
        "Clients · V1 Preview · Assignments",
        "Clients · V1 Preview · Groups",
        "Clients · V1 Preview · Relations"
      ]
    },
    {
      "name": "Workspaces",
      "tags": [
        "Workspaces · V1 Preview",
        "Workspaces · V1 Preview · Teams"
      ]
    }
  ]
}