{
  "openapi": "3.0.3",
  "paths": {
    "/organizations/{organizationId}/client-grants": {
      "get": {
        "tags": [
          "Client grants"
        ],
        "summary": "Get client grants",
        "description": "**required scopes:** `contextual:client-grants:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ClientGrant"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Client grants"
        ],
        "summary": "Create a client grant",
        "description": "**required scopes:** `contextual:client-grants:create`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "resource_server_id": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "minLength": 1
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "client_id",
                  "resource_server_id",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientGrant"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/client-grants": {
      "get": {
        "tags": [
          "Client grants"
        ],
        "summary": "Get client grants",
        "description": "**required scopes:** `contextual:client-grants:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ClientGrant"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Client grants"
        ],
        "summary": "Create a client grant",
        "description": "**required scopes:** `contextual:client-grants:create`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "resource_server_id": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "minLength": 1
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "client_id",
                  "resource_server_id",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientGrant"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/organizations/{organizationId}/client-grants": {
      "post": {
        "tags": [
          "Client grants"
        ],
        "summary": "Page client grants",
        "description": "**required scopes:** `contextual:client-grants:read`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ClientGrant"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/client-grants": {
      "post": {
        "tags": [
          "Client grants"
        ],
        "summary": "Page client grants",
        "description": "**required scopes:** `contextual:client-grants:read`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ClientGrant"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/client-grants/{id}": {
      "get": {
        "tags": [
          "Client grants"
        ],
        "summary": "Get client grant by id",
        "description": "**required scopes:** `contextual:client-grants:read`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientGrant"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client grant not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Client grants"
        ],
        "summary": "Update client grant by id",
        "description": "**required scopes:** `contextual:client-grants:update`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "minLength": 1
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "client_id",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientGrant"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client grant not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Client grants"
        ],
        "summary": "Delete client grant by id",
        "description": "**required scopes:** `contextual:client-grants:delete`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Client grant deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid client grant id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client grant not found",
            "content": {}
          }
        }
      }
    },
    "/client-grants/{id}": {
      "get": {
        "tags": [
          "Client grants"
        ],
        "summary": "Get client grant by id",
        "description": "**required scopes:** `contextual:client-grants:read`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientGrant"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client grant not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Client grants"
        ],
        "summary": "Update client grant by id",
        "description": "**required scopes:** `contextual:client-grants:update`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "minLength": 1
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "client_id",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientGrant"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client grant not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Client grants"
        ],
        "summary": "Delete client grant by id",
        "description": "**required scopes:** `contextual:client-grants:delete`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Client grant deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid client grant id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client grant not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/clients": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Get clients",
        "description": "**required scopes:** `contextual:clients:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Client"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Create a client",
        "description": "**required scopes:** `contextual:clients:create`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "client_type": {
                    "type": "string",
                    "const": "non_interactive"
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "client_type",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/clients": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Get clients",
        "description": "**required scopes:** `contextual:clients:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Client"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Create a client",
        "description": "**required scopes:** `contextual:clients:create`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "client_type": {
                    "type": "string",
                    "const": "non_interactive"
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "client_type",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/organizations/{organizationId}/clients": {
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Page clients",
        "description": "**required scopes:** `contextual:clients:read`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Client"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/clients": {
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Page clients",
        "description": "**required scopes:** `contextual:clients:read`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Client"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/clients/{clientId}": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Get client by id",
        "description": "**required scopes:** `contextual:clients:read`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Clients"
        ],
        "summary": "Update client by id",
        "description": "**required scopes:** `contextual:clients:update`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "client_type": {
                    "type": "string",
                    "const": "non_interactive"
                  },
                  "is_active": {
                    "default": true,
                    "type": "boolean"
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "client_type",
                  "is_active",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Clients"
        ],
        "summary": "Delete client by id",
        "description": "**required scopes:** `contextual:clients:delete`, `contextual:client-grants:delete`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Client deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid client id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      }
    },
    "/clients/{clientId}": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Get client by id",
        "description": "**required scopes:** `contextual:clients:read`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Clients"
        ],
        "summary": "Update client by id",
        "description": "**required scopes:** `contextual:clients:update`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "client_type": {
                    "type": "string",
                    "const": "non_interactive"
                  },
                  "is_active": {
                    "default": true,
                    "type": "boolean"
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "client_type",
                  "is_active",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Clients"
        ],
        "summary": "Delete client by id",
        "description": "**required scopes:** `contextual:clients:delete`, `contextual:client-grants:delete`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Client deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid client id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/clients/{clientId}/secret": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Get client secret by id",
        "description": "**required scopes:** `contextual:client-secrets:read`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "client_secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "client_secret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      }
    },
    "/clients/{clientId}/secret": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Get client secret by id",
        "description": "**required scopes:** `contextual:client-secrets:read`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "client_secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "client_secret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/clients/{clientId}/rotate-secret": {
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Rotate client secret by id",
        "description": "**required scopes:** `contextual:client-secrets:update`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Client secret rotated successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      }
    },
    "/clients/{clientId}/rotate-secret": {
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Rotate client secret by id",
        "description": "**required scopes:** `contextual:client-secrets:update`",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Client secret rotated successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Client not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get users",
        "description": "**required scopes:** `contextual:users:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/User"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get users",
        "description": "**required scopes:** `contextual:users:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/User"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/organizations/{organizationId}/users": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Page users",
        "description": "**required scopes:** `contextual:users:read`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/User"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/users": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Page users",
        "description": "**required scopes:** `contextual:users:read`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/User"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/users/{userId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get user by id",
        "description": "**required scopes:** `contextual:users:read`",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update user by id",
        "description": "**required scopes:** `contextual:users:update`",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roles": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "roles"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete user by id",
        "description": "**required scopes:** `contextual:users:delete`",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "User deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid user id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/users/{userId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get user by id",
        "description": "**required scopes:** `contextual:users:read`",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update user by id",
        "description": "**required scopes:** `contextual:users:update`",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roles": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "roles"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete user by id",
        "description": "**required scopes:** `contextual:users:delete`",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "User deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid user id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/me": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get current user",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete user by id",
        "description": "**required scopes:** `contextual:users:delete`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "User deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid user id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/me": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get current user",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete user by id",
        "description": "**required scopes:** `contextual:users:delete`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "User deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid user id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/users/{userId}/permissions": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get user permissions by id",
        "description": "**required scopes:** `contextual:users:read`",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPermissions"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/users/{userId}/permissions": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get user permissions by id",
        "description": "**required scopes:** `contextual:users:read`",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPermissions"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/me/permissions": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get current user permissions",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPermissions"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/me/permissions": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get current user permissions",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPermissions"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/users/{userId}/profile": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get user by id",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fullName": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update user by id",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fullName": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fullName": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/me/profile": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get current user profile",
        "parameters": [],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fullName": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update current user profile",
        "parameters": [],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fullName": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fullName": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/invitations": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "Get invitations",
        "description": "**required scopes:** `contextual:invitations:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Invitation"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Create an invitation",
        "description": "**required scopes:** `contextual:invitations:create`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1
                  },
                  "roles": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "email",
                  "roles"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/invitations": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "Get invitations",
        "description": "**required scopes:** `contextual:invitations:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Invitation"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Create an invitation",
        "description": "**required scopes:** `contextual:invitations:create`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1
                  },
                  "roles": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "email",
                  "roles"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/organizations/{organizationId}/invitations": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Page invitations",
        "description": "**required scopes:** `contextual:invitations:read`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Invitation"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/invitations": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Page invitations",
        "description": "**required scopes:** `contextual:invitations:read`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Invitation"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/invitations/{invitationId}": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "Get invitation by id",
        "description": "**required scopes:** `contextual:invitations:read`",
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invitation not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Invitations"
        ],
        "summary": "Delete invitation by id",
        "description": "**required scopes:** `contextual:invitations:delete`",
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Invitation deleted successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invitation not found",
            "content": {}
          }
        }
      }
    },
    "/invitations/{invitationId}": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "Get invitation by id",
        "description": "**required scopes:** `contextual:invitations:read`",
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Role not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Invitations"
        ],
        "summary": "Delete invitation by id",
        "description": "**required scopes:** `contextual:invitations:delete`",
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Invitation deleted successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invitation not found",
            "content": {}
          }
        }
      }
    },
    "/invitations/accept": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Accept an invitation",
        "parameters": [],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invitation not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/configs/k8s": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization k8s config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "k8s"
                    },
                    "namespace": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "namespace",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization k8s config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization k8s config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "k8s"
                  },
                  "namespace": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "namespace"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "k8s"
                    },
                    "namespace": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "namespace",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organization-configs/k8s": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization k8s config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "k8s"
                    },
                    "namespace": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "namespace",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization k8s config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization k8s config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "k8s"
                  },
                  "namespace": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "namespace"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "k8s"
                    },
                    "namespace": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "namespace",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/configs/messaging": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization messaging config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "const": "messaging"
                            },
                            "topicTemplate": {
                              "type": "string",
                              "pattern": "%s"
                            },
                            "topics": {
                              "type": "object",
                              "properties": {
                                "agentControlEvents": {
                                  "type": "string"
                                },
                                "aiSearchEmbedding": {
                                  "type": "string"
                                },
                                "aiSearchFilter": {
                                  "type": "string"
                                },
                                "logs": {
                                  "type": "string"
                                },
                                "triggers": {
                                  "type": "string"
                                },
                                "triggersControl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "agentControlEvents",
                                "aiSearchEmbedding",
                                "aiSearchFilter",
                                "logs",
                                "triggers",
                                "triggersControl"
                              ],
                              "additionalProperties": false
                            },
                            "brokers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                              }
                            },
                            "saslConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "kafka"
                            },
                            "provider": {
                              "type": "string",
                              "const": "confluent"
                            },
                            "confluentConfig": {
                              "type": "object",
                              "properties": {
                                "environmentId": {
                                  "type": "string"
                                },
                                "environmentName": {
                                  "type": "string"
                                },
                                "clusterId": {
                                  "type": "string"
                                },
                                "clusterName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "environmentId",
                                "environmentName",
                                "clusterId",
                                "clusterName"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "topicTemplate",
                            "topics",
                            "brokers",
                            "saslConfig",
                            "type",
                            "provider",
                            "confluentConfig"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "const": "messaging"
                            },
                            "topicTemplate": {
                              "type": "string",
                              "pattern": "%s"
                            },
                            "topics": {
                              "type": "object",
                              "properties": {
                                "agentControlEvents": {
                                  "type": "string"
                                },
                                "aiSearchEmbedding": {
                                  "type": "string"
                                },
                                "aiSearchFilter": {
                                  "type": "string"
                                },
                                "logs": {
                                  "type": "string"
                                },
                                "triggers": {
                                  "type": "string"
                                },
                                "triggersControl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "agentControlEvents",
                                "aiSearchEmbedding",
                                "aiSearchFilter",
                                "logs",
                                "triggers",
                                "triggersControl"
                              ],
                              "additionalProperties": false
                            },
                            "brokers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                              }
                            },
                            "saslConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "pulsar"
                            },
                            "serviceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "authConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "const": "oauth"
                                    },
                                    "issuerUrl": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "client_credentials"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "issuerUrl",
                                    "type",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "const": "bearer"
                                    },
                                    "bearerToken": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "bearerToken"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "adminServiceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "provider": {
                              "type": "string",
                              "const": "streamnative"
                            }
                          },
                          "required": [
                            "id",
                            "topicTemplate",
                            "topics",
                            "brokers",
                            "saslConfig",
                            "type",
                            "serviceUrl",
                            "authConfig",
                            "adminServiceUrl",
                            "provider"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_metaData": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string",
                              "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                              "description": "An ISO 8601 date time string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                              "description": "An ISO 8601 date time string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "_metaData"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization messaging config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization messaging config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "const": "messaging"
                      },
                      "topicTemplate": {
                        "type": "string",
                        "pattern": "%s"
                      },
                      "topics": {
                        "type": "object",
                        "properties": {
                          "agentControlEvents": {
                            "type": "string"
                          },
                          "aiSearchEmbedding": {
                            "type": "string"
                          },
                          "aiSearchFilter": {
                            "type": "string"
                          },
                          "logs": {
                            "type": "string"
                          },
                          "triggers": {
                            "type": "string"
                          },
                          "triggersControl": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentControlEvents",
                          "aiSearchEmbedding",
                          "aiSearchFilter",
                          "logs",
                          "triggers",
                          "triggersControl"
                        ],
                        "additionalProperties": false
                      },
                      "brokers": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                        }
                      },
                      "saslConfig": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "plain"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "scram-sha-256"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "scram-sha-512"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "oauthbearer"
                              },
                              "authEndpoint": {
                                "type": "string"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "clientSecret": {
                                "type": "string"
                              },
                              "audience": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "authEndpoint",
                              "clientId",
                              "clientSecret",
                              "audience"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "kafka"
                      },
                      "provider": {
                        "type": "string",
                        "const": "confluent"
                      },
                      "confluentConfig": {
                        "type": "object",
                        "properties": {
                          "environmentId": {
                            "type": "string"
                          },
                          "environmentName": {
                            "type": "string"
                          },
                          "clusterId": {
                            "type": "string"
                          },
                          "clusterName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "environmentId",
                          "environmentName",
                          "clusterId",
                          "clusterName"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "topicTemplate",
                      "topics",
                      "brokers",
                      "saslConfig",
                      "type",
                      "provider",
                      "confluentConfig"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "const": "messaging"
                      },
                      "topicTemplate": {
                        "type": "string",
                        "pattern": "%s"
                      },
                      "topics": {
                        "type": "object",
                        "properties": {
                          "agentControlEvents": {
                            "type": "string"
                          },
                          "aiSearchEmbedding": {
                            "type": "string"
                          },
                          "aiSearchFilter": {
                            "type": "string"
                          },
                          "logs": {
                            "type": "string"
                          },
                          "triggers": {
                            "type": "string"
                          },
                          "triggersControl": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentControlEvents",
                          "aiSearchEmbedding",
                          "aiSearchFilter",
                          "logs",
                          "triggers",
                          "triggersControl"
                        ],
                        "additionalProperties": false
                      },
                      "brokers": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                        }
                      },
                      "saslConfig": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "plain"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "scram-sha-256"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "scram-sha-512"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "oauthbearer"
                              },
                              "authEndpoint": {
                                "type": "string"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "clientSecret": {
                                "type": "string"
                              },
                              "audience": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "authEndpoint",
                              "clientId",
                              "clientSecret",
                              "audience"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "pulsar"
                      },
                      "serviceUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "authConfig": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "const": "oauth"
                              },
                              "issuerUrl": {
                                "type": "string",
                                "format": "uri"
                              },
                              "type": {
                                "type": "string",
                                "const": "client_credentials"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "clientSecret": {
                                "type": "string"
                              },
                              "audience": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mode",
                              "issuerUrl",
                              "type",
                              "clientId",
                              "clientSecret",
                              "audience"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "const": "bearer"
                              },
                              "bearerToken": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mode",
                              "bearerToken"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "adminServiceUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "provider": {
                        "type": "string",
                        "const": "streamnative"
                      }
                    },
                    "required": [
                      "id",
                      "topicTemplate",
                      "topics",
                      "brokers",
                      "saslConfig",
                      "type",
                      "serviceUrl",
                      "authConfig",
                      "adminServiceUrl",
                      "provider"
                    ],
                    "additionalProperties": false
                  }
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "const": "messaging"
                            },
                            "topicTemplate": {
                              "type": "string",
                              "pattern": "%s"
                            },
                            "topics": {
                              "type": "object",
                              "properties": {
                                "agentControlEvents": {
                                  "type": "string"
                                },
                                "aiSearchEmbedding": {
                                  "type": "string"
                                },
                                "aiSearchFilter": {
                                  "type": "string"
                                },
                                "logs": {
                                  "type": "string"
                                },
                                "triggers": {
                                  "type": "string"
                                },
                                "triggersControl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "agentControlEvents",
                                "aiSearchEmbedding",
                                "aiSearchFilter",
                                "logs",
                                "triggers",
                                "triggersControl"
                              ],
                              "additionalProperties": false
                            },
                            "brokers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                              }
                            },
                            "saslConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "kafka"
                            },
                            "provider": {
                              "type": "string",
                              "const": "confluent"
                            },
                            "confluentConfig": {
                              "type": "object",
                              "properties": {
                                "environmentId": {
                                  "type": "string"
                                },
                                "environmentName": {
                                  "type": "string"
                                },
                                "clusterId": {
                                  "type": "string"
                                },
                                "clusterName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "environmentId",
                                "environmentName",
                                "clusterId",
                                "clusterName"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "topicTemplate",
                            "topics",
                            "brokers",
                            "saslConfig",
                            "type",
                            "provider",
                            "confluentConfig"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "const": "messaging"
                            },
                            "topicTemplate": {
                              "type": "string",
                              "pattern": "%s"
                            },
                            "topics": {
                              "type": "object",
                              "properties": {
                                "agentControlEvents": {
                                  "type": "string"
                                },
                                "aiSearchEmbedding": {
                                  "type": "string"
                                },
                                "aiSearchFilter": {
                                  "type": "string"
                                },
                                "logs": {
                                  "type": "string"
                                },
                                "triggers": {
                                  "type": "string"
                                },
                                "triggersControl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "agentControlEvents",
                                "aiSearchEmbedding",
                                "aiSearchFilter",
                                "logs",
                                "triggers",
                                "triggersControl"
                              ],
                              "additionalProperties": false
                            },
                            "brokers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                              }
                            },
                            "saslConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "pulsar"
                            },
                            "serviceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "authConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "const": "oauth"
                                    },
                                    "issuerUrl": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "client_credentials"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "issuerUrl",
                                    "type",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "const": "bearer"
                                    },
                                    "bearerToken": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "bearerToken"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "adminServiceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "provider": {
                              "type": "string",
                              "const": "streamnative"
                            }
                          },
                          "required": [
                            "id",
                            "topicTemplate",
                            "topics",
                            "brokers",
                            "saslConfig",
                            "type",
                            "serviceUrl",
                            "authConfig",
                            "adminServiceUrl",
                            "provider"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_metaData": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string",
                              "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                              "description": "An ISO 8601 date time string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                              "description": "An ISO 8601 date time string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "_metaData"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organization-configs/messaging": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization messaging config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "const": "messaging"
                            },
                            "topicTemplate": {
                              "type": "string",
                              "pattern": "%s"
                            },
                            "topics": {
                              "type": "object",
                              "properties": {
                                "agentControlEvents": {
                                  "type": "string"
                                },
                                "aiSearchEmbedding": {
                                  "type": "string"
                                },
                                "aiSearchFilter": {
                                  "type": "string"
                                },
                                "logs": {
                                  "type": "string"
                                },
                                "triggers": {
                                  "type": "string"
                                },
                                "triggersControl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "agentControlEvents",
                                "aiSearchEmbedding",
                                "aiSearchFilter",
                                "logs",
                                "triggers",
                                "triggersControl"
                              ],
                              "additionalProperties": false
                            },
                            "brokers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                              }
                            },
                            "saslConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "kafka"
                            },
                            "provider": {
                              "type": "string",
                              "const": "confluent"
                            },
                            "confluentConfig": {
                              "type": "object",
                              "properties": {
                                "environmentId": {
                                  "type": "string"
                                },
                                "environmentName": {
                                  "type": "string"
                                },
                                "clusterId": {
                                  "type": "string"
                                },
                                "clusterName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "environmentId",
                                "environmentName",
                                "clusterId",
                                "clusterName"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "topicTemplate",
                            "topics",
                            "brokers",
                            "saslConfig",
                            "type",
                            "provider",
                            "confluentConfig"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "const": "messaging"
                            },
                            "topicTemplate": {
                              "type": "string",
                              "pattern": "%s"
                            },
                            "topics": {
                              "type": "object",
                              "properties": {
                                "agentControlEvents": {
                                  "type": "string"
                                },
                                "aiSearchEmbedding": {
                                  "type": "string"
                                },
                                "aiSearchFilter": {
                                  "type": "string"
                                },
                                "logs": {
                                  "type": "string"
                                },
                                "triggers": {
                                  "type": "string"
                                },
                                "triggersControl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "agentControlEvents",
                                "aiSearchEmbedding",
                                "aiSearchFilter",
                                "logs",
                                "triggers",
                                "triggersControl"
                              ],
                              "additionalProperties": false
                            },
                            "brokers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                              }
                            },
                            "saslConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "pulsar"
                            },
                            "serviceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "authConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "const": "oauth"
                                    },
                                    "issuerUrl": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "client_credentials"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "issuerUrl",
                                    "type",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "const": "bearer"
                                    },
                                    "bearerToken": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "bearerToken"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "adminServiceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "provider": {
                              "type": "string",
                              "const": "streamnative"
                            }
                          },
                          "required": [
                            "id",
                            "topicTemplate",
                            "topics",
                            "brokers",
                            "saslConfig",
                            "type",
                            "serviceUrl",
                            "authConfig",
                            "adminServiceUrl",
                            "provider"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_metaData": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string",
                              "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                              "description": "An ISO 8601 date time string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                              "description": "An ISO 8601 date time string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "_metaData"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization messaging config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization messaging config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "const": "messaging"
                      },
                      "topicTemplate": {
                        "type": "string",
                        "pattern": "%s"
                      },
                      "topics": {
                        "type": "object",
                        "properties": {
                          "agentControlEvents": {
                            "type": "string"
                          },
                          "aiSearchEmbedding": {
                            "type": "string"
                          },
                          "aiSearchFilter": {
                            "type": "string"
                          },
                          "logs": {
                            "type": "string"
                          },
                          "triggers": {
                            "type": "string"
                          },
                          "triggersControl": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentControlEvents",
                          "aiSearchEmbedding",
                          "aiSearchFilter",
                          "logs",
                          "triggers",
                          "triggersControl"
                        ],
                        "additionalProperties": false
                      },
                      "brokers": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                        }
                      },
                      "saslConfig": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "plain"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "scram-sha-256"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "scram-sha-512"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "oauthbearer"
                              },
                              "authEndpoint": {
                                "type": "string"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "clientSecret": {
                                "type": "string"
                              },
                              "audience": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "authEndpoint",
                              "clientId",
                              "clientSecret",
                              "audience"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "kafka"
                      },
                      "provider": {
                        "type": "string",
                        "const": "confluent"
                      },
                      "confluentConfig": {
                        "type": "object",
                        "properties": {
                          "environmentId": {
                            "type": "string"
                          },
                          "environmentName": {
                            "type": "string"
                          },
                          "clusterId": {
                            "type": "string"
                          },
                          "clusterName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "environmentId",
                          "environmentName",
                          "clusterId",
                          "clusterName"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "topicTemplate",
                      "topics",
                      "brokers",
                      "saslConfig",
                      "type",
                      "provider",
                      "confluentConfig"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "const": "messaging"
                      },
                      "topicTemplate": {
                        "type": "string",
                        "pattern": "%s"
                      },
                      "topics": {
                        "type": "object",
                        "properties": {
                          "agentControlEvents": {
                            "type": "string"
                          },
                          "aiSearchEmbedding": {
                            "type": "string"
                          },
                          "aiSearchFilter": {
                            "type": "string"
                          },
                          "logs": {
                            "type": "string"
                          },
                          "triggers": {
                            "type": "string"
                          },
                          "triggersControl": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentControlEvents",
                          "aiSearchEmbedding",
                          "aiSearchFilter",
                          "logs",
                          "triggers",
                          "triggersControl"
                        ],
                        "additionalProperties": false
                      },
                      "brokers": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                        }
                      },
                      "saslConfig": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "plain"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "scram-sha-256"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "scram-sha-512"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "username",
                              "password"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mechanism": {
                                "type": "string",
                                "const": "oauthbearer"
                              },
                              "authEndpoint": {
                                "type": "string"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "clientSecret": {
                                "type": "string"
                              },
                              "audience": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mechanism",
                              "authEndpoint",
                              "clientId",
                              "clientSecret",
                              "audience"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "pulsar"
                      },
                      "serviceUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "authConfig": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "const": "oauth"
                              },
                              "issuerUrl": {
                                "type": "string",
                                "format": "uri"
                              },
                              "type": {
                                "type": "string",
                                "const": "client_credentials"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "clientSecret": {
                                "type": "string"
                              },
                              "audience": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mode",
                              "issuerUrl",
                              "type",
                              "clientId",
                              "clientSecret",
                              "audience"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "const": "bearer"
                              },
                              "bearerToken": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "mode",
                              "bearerToken"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "adminServiceUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "provider": {
                        "type": "string",
                        "const": "streamnative"
                      }
                    },
                    "required": [
                      "id",
                      "topicTemplate",
                      "topics",
                      "brokers",
                      "saslConfig",
                      "type",
                      "serviceUrl",
                      "authConfig",
                      "adminServiceUrl",
                      "provider"
                    ],
                    "additionalProperties": false
                  }
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "const": "messaging"
                            },
                            "topicTemplate": {
                              "type": "string",
                              "pattern": "%s"
                            },
                            "topics": {
                              "type": "object",
                              "properties": {
                                "agentControlEvents": {
                                  "type": "string"
                                },
                                "aiSearchEmbedding": {
                                  "type": "string"
                                },
                                "aiSearchFilter": {
                                  "type": "string"
                                },
                                "logs": {
                                  "type": "string"
                                },
                                "triggers": {
                                  "type": "string"
                                },
                                "triggersControl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "agentControlEvents",
                                "aiSearchEmbedding",
                                "aiSearchFilter",
                                "logs",
                                "triggers",
                                "triggersControl"
                              ],
                              "additionalProperties": false
                            },
                            "brokers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                              }
                            },
                            "saslConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "kafka"
                            },
                            "provider": {
                              "type": "string",
                              "const": "confluent"
                            },
                            "confluentConfig": {
                              "type": "object",
                              "properties": {
                                "environmentId": {
                                  "type": "string"
                                },
                                "environmentName": {
                                  "type": "string"
                                },
                                "clusterId": {
                                  "type": "string"
                                },
                                "clusterName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "environmentId",
                                "environmentName",
                                "clusterId",
                                "clusterName"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "topicTemplate",
                            "topics",
                            "brokers",
                            "saslConfig",
                            "type",
                            "provider",
                            "confluentConfig"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "const": "messaging"
                            },
                            "topicTemplate": {
                              "type": "string",
                              "pattern": "%s"
                            },
                            "topics": {
                              "type": "object",
                              "properties": {
                                "agentControlEvents": {
                                  "type": "string"
                                },
                                "aiSearchEmbedding": {
                                  "type": "string"
                                },
                                "aiSearchFilter": {
                                  "type": "string"
                                },
                                "logs": {
                                  "type": "string"
                                },
                                "triggers": {
                                  "type": "string"
                                },
                                "triggersControl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "agentControlEvents",
                                "aiSearchEmbedding",
                                "aiSearchFilter",
                                "logs",
                                "triggers",
                                "triggersControl"
                              ],
                              "additionalProperties": false
                            },
                            "brokers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)+(?::[0-9]+)?$"
                              }
                            },
                            "saslConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "pulsar"
                            },
                            "serviceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "authConfig": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "const": "oauth"
                                    },
                                    "issuerUrl": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "client_credentials"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "issuerUrl",
                                    "type",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "const": "bearer"
                                    },
                                    "bearerToken": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "bearerToken"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "adminServiceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "provider": {
                              "type": "string",
                              "const": "streamnative"
                            }
                          },
                          "required": [
                            "id",
                            "topicTemplate",
                            "topics",
                            "brokers",
                            "saslConfig",
                            "type",
                            "serviceUrl",
                            "authConfig",
                            "adminServiceUrl",
                            "provider"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_metaData": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string",
                              "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                              "description": "An ISO 8601 date time string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                              "description": "An ISO 8601 date time string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "_metaData"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/configs/theme": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization theme config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "theme"
                    },
                    "name": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization theme config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization theme config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "theme"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "theme"
                    },
                    "name": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organization-configs/theme": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization theme config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "theme"
                    },
                    "name": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization theme config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization theme config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "theme"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "theme"
                    },
                    "name": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/configs/node-red": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization node red config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "node-red"
                    },
                    "credentialSecret": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "credentialSecret",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization node red config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization node red config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "node-red"
                  },
                  "credentialSecret": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "credentialSecret"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "node-red"
                    },
                    "credentialSecret": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "credentialSecret",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organization-configs/node-red": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization node red config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "node-red"
                    },
                    "credentialSecret": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "credentialSecret",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization node red config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization node red config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "node-red"
                  },
                  "credentialSecret": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "credentialSecret"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "node-red"
                    },
                    "credentialSecret": {
                      "type": "string"
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "credentialSecret",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/configs/search": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization search config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "search"
                    },
                    "apiKeyId": {
                      "type": "string"
                    },
                    "apiKey": {
                      "type": "string"
                    },
                    "indices": {
                      "type": "object",
                      "properties": {
                        "logs": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "logs"
                      ],
                      "additionalProperties": false
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "apiKeyId",
                    "apiKey",
                    "indices",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization search config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization search config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "search"
                  },
                  "apiKeyId": {
                    "type": "string"
                  },
                  "apiKey": {
                    "type": "string"
                  },
                  "indices": {
                    "type": "object",
                    "properties": {
                      "logs": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "logs"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "apiKeyId",
                  "apiKey",
                  "indices"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "search"
                    },
                    "apiKeyId": {
                      "type": "string"
                    },
                    "apiKey": {
                      "type": "string"
                    },
                    "indices": {
                      "type": "object",
                      "properties": {
                        "logs": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "logs"
                      ],
                      "additionalProperties": false
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "apiKeyId",
                    "apiKey",
                    "indices",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organization-configs/search": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization search config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "search"
                    },
                    "apiKeyId": {
                      "type": "string"
                    },
                    "apiKey": {
                      "type": "string"
                    },
                    "indices": {
                      "type": "object",
                      "properties": {
                        "logs": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "logs"
                      ],
                      "additionalProperties": false
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "apiKeyId",
                    "apiKey",
                    "indices",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization search config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization search config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "search"
                  },
                  "apiKeyId": {
                    "type": "string"
                  },
                  "apiKey": {
                    "type": "string"
                  },
                  "indices": {
                    "type": "object",
                    "properties": {
                      "logs": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "logs"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "apiKeyId",
                  "apiKey",
                  "indices"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "search"
                    },
                    "apiKeyId": {
                      "type": "string"
                    },
                    "apiKey": {
                      "type": "string"
                    },
                    "indices": {
                      "type": "object",
                      "properties": {
                        "logs": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "logs"
                      ],
                      "additionalProperties": false
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "apiKeyId",
                    "apiKey",
                    "indices",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/configs/scheduled-actions": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization scheduled actions config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "scheduled-actions"
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "authEndpoint": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "clientSecret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "authEndpoint",
                        "clientId",
                        "clientSecret"
                      ],
                      "additionalProperties": false
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "auth",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization scheduled actions config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization scheduled actions config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "scheduled-actions"
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "authEndpoint": {
                        "type": "string"
                      },
                      "audience": {
                        "type": "string"
                      },
                      "clientId": {
                        "type": "string"
                      },
                      "clientSecret": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "authEndpoint",
                      "clientId",
                      "clientSecret"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "auth"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "scheduled-actions"
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "authEndpoint": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "clientSecret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "authEndpoint",
                        "clientId",
                        "clientSecret"
                      ],
                      "additionalProperties": false
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "auth",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organization-configs/scheduled-actions": {
      "get": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Get organization scheduled actions config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "scheduled-actions"
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "authEndpoint": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "clientSecret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "authEndpoint",
                        "clientId",
                        "clientSecret"
                      ],
                      "additionalProperties": false
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "auth",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization scheduled actions config not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization scheduled actions config",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "scheduled-actions"
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "authEndpoint": {
                        "type": "string"
                      },
                      "audience": {
                        "type": "string"
                      },
                      "clientId": {
                        "type": "string"
                      },
                      "clientSecret": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "authEndpoint",
                      "clientId",
                      "clientSecret"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "auth"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "scheduled-actions"
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "authEndpoint": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "clientSecret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "authEndpoint",
                        "clientId",
                        "clientSecret"
                      ],
                      "additionalProperties": false
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "auth",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/configs/encrypt": {
      "post": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Encrypt relevant configs for organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Organization configs have been encrypted",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organization-configs/encrypt": {
      "post": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Encrypt relevant configs for organization",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Organization configs have been encrypted",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/configs/encrypt": {
      "post": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Encrypt relevant configs for all organizations",
        "parameters": [],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Organization configs have been encrypted",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get organizations",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Organization"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Create an organization",
        "parameters": [
          {
            "name": "confluentEnvId",
            "in": "query",
            "required": false
          },
          {
            "name": "confluentClusterId",
            "in": "query",
            "required": false
          },
          {
            "name": "aksNamespace",
            "in": "query",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "baseDomain": {
                    "type": "string"
                  },
                  "features": {
                    "type": "object",
                    "properties": {
                      "mfa": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "featureLimits": {
                    "type": "object",
                    "properties": {
                      "maxUsers": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxObjectTypes": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxRecords": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxTopics": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxPartitions": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgentPods": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxInstancesPerAgent": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxEvents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxCustomDomainedAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogRetentionDays": {
                        "default": 1,
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 7
                          },
                          {
                            "type": "number",
                            "const": 30
                          }
                        ]
                      },
                      "maxTriggerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxTriggerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "maxUsers",
                      "maxObjectTypes",
                      "maxRecords",
                      "maxTopics",
                      "maxPartitions",
                      "maxAgents",
                      "maxAgentPods",
                      "maxInstancesPerAgent",
                      "maxEvents",
                      "maxCustomDomainedAgents",
                      "maxAiSearchEventHandlerPartitions",
                      "maxAiSearchEventHandlerReplicas",
                      "maxAiSearchEmbeddingEventHandlerPartitions",
                      "maxAiSearchEmbeddingEventHandlerReplicas",
                      "maxLogPartitions",
                      "maxLogReplicas",
                      "maxLogRetentionDays",
                      "maxTriggerPartitions",
                      "maxTriggerReplicas"
                    ],
                    "additionalProperties": false
                  },
                  "bssConnection": {
                    "type": "object",
                    "properties": {
                      "auth": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "audience": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "url",
                          "clientId",
                          "clientSecret",
                          "audience"
                        ],
                        "additionalProperties": false
                      },
                      "eventReportingUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "adminApiUrl": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "required": [
                      "auth",
                      "eventReportingUrl",
                      "adminApiUrl"
                    ],
                    "additionalProperties": false
                  },
                  "suspensions": {
                    "type": "object",
                    "properties": {
                      "agents": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "enforceMfaOn": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/organizations": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Page organizations",
        "parameters": [],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Organization"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get organization by id",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organizations"
        ],
        "summary": "Update organization by id",
        "description": "**required scopes:** `contextual:organizations:update`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "baseDomain": {
                    "type": "string"
                  },
                  "features": {
                    "type": "object",
                    "properties": {
                      "mfa": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "featureLimits": {
                    "type": "object",
                    "properties": {
                      "maxUsers": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxObjectTypes": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxRecords": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxTopics": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxPartitions": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgentPods": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxInstancesPerAgent": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxEvents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxCustomDomainedAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogRetentionDays": {
                        "default": 1,
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 7
                          },
                          {
                            "type": "number",
                            "const": 30
                          }
                        ]
                      },
                      "maxTriggerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxTriggerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "maxUsers",
                      "maxObjectTypes",
                      "maxRecords",
                      "maxTopics",
                      "maxPartitions",
                      "maxAgents",
                      "maxAgentPods",
                      "maxInstancesPerAgent",
                      "maxEvents",
                      "maxCustomDomainedAgents",
                      "maxAiSearchEventHandlerPartitions",
                      "maxAiSearchEventHandlerReplicas",
                      "maxAiSearchEmbeddingEventHandlerPartitions",
                      "maxAiSearchEmbeddingEventHandlerReplicas",
                      "maxLogPartitions",
                      "maxLogReplicas",
                      "maxLogRetentionDays",
                      "maxTriggerPartitions",
                      "maxTriggerReplicas"
                    ],
                    "additionalProperties": false
                  },
                  "bssConnection": {
                    "type": "object",
                    "properties": {
                      "auth": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "audience": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "url",
                          "clientId",
                          "clientSecret",
                          "audience"
                        ],
                        "additionalProperties": false
                      },
                      "eventReportingUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "adminApiUrl": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "required": [
                      "auth",
                      "eventReportingUrl",
                      "adminApiUrl"
                    ],
                    "additionalProperties": false
                  },
                  "suspensions": {
                    "type": "object",
                    "properties": {
                      "agents": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "enforceMfaOn": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      },
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Update organization by id",
        "description": "**required scopes:** `contextual:organizations:update`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "baseDomain": {
                    "type": "string"
                  },
                  "features": {
                    "type": "object",
                    "properties": {
                      "mfa": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "featureLimits": {
                    "type": "object",
                    "properties": {
                      "maxUsers": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxObjectTypes": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxRecords": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxTopics": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxPartitions": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgentPods": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxInstancesPerAgent": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxEvents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxCustomDomainedAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogRetentionDays": {
                        "default": 1,
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 7
                          },
                          {
                            "type": "number",
                            "const": 30
                          }
                        ]
                      },
                      "maxTriggerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxTriggerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "maxUsers",
                      "maxObjectTypes",
                      "maxRecords",
                      "maxTopics",
                      "maxPartitions",
                      "maxAgents",
                      "maxAgentPods",
                      "maxInstancesPerAgent",
                      "maxEvents",
                      "maxCustomDomainedAgents",
                      "maxAiSearchEventHandlerPartitions",
                      "maxAiSearchEventHandlerReplicas",
                      "maxAiSearchEmbeddingEventHandlerPartitions",
                      "maxAiSearchEmbeddingEventHandlerReplicas",
                      "maxLogPartitions",
                      "maxLogReplicas",
                      "maxLogRetentionDays",
                      "maxTriggerPartitions",
                      "maxTriggerReplicas"
                    ],
                    "additionalProperties": false
                  },
                  "bssConnection": {
                    "type": "object",
                    "properties": {
                      "auth": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "audience": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "url",
                          "clientId",
                          "clientSecret",
                          "audience"
                        ],
                        "additionalProperties": false
                      },
                      "eventReportingUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "adminApiUrl": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "required": [
                      "auth",
                      "eventReportingUrl",
                      "adminApiUrl"
                    ],
                    "additionalProperties": false
                  },
                  "suspensions": {
                    "type": "object",
                    "properties": {
                      "agents": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "enforceMfaOn": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Delete organization by id",
        "description": "**required scopes:** `contextual:organizations:delete`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Organization deleted successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      }
    },
    "/organization": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get organization by id",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Organizations"
        ],
        "summary": "Update organization by id",
        "description": "**required scopes:** `contextual:organizations:update`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "baseDomain": {
                    "type": "string"
                  },
                  "features": {
                    "type": "object",
                    "properties": {
                      "mfa": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "featureLimits": {
                    "type": "object",
                    "properties": {
                      "maxUsers": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxObjectTypes": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxRecords": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxTopics": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxPartitions": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgentPods": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxInstancesPerAgent": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxEvents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxCustomDomainedAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogRetentionDays": {
                        "default": 1,
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 7
                          },
                          {
                            "type": "number",
                            "const": 30
                          }
                        ]
                      },
                      "maxTriggerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxTriggerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "maxUsers",
                      "maxObjectTypes",
                      "maxRecords",
                      "maxTopics",
                      "maxPartitions",
                      "maxAgents",
                      "maxAgentPods",
                      "maxInstancesPerAgent",
                      "maxEvents",
                      "maxCustomDomainedAgents",
                      "maxAiSearchEventHandlerPartitions",
                      "maxAiSearchEventHandlerReplicas",
                      "maxAiSearchEmbeddingEventHandlerPartitions",
                      "maxAiSearchEmbeddingEventHandlerReplicas",
                      "maxLogPartitions",
                      "maxLogReplicas",
                      "maxLogRetentionDays",
                      "maxTriggerPartitions",
                      "maxTriggerReplicas"
                    ],
                    "additionalProperties": false
                  },
                  "bssConnection": {
                    "type": "object",
                    "properties": {
                      "auth": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "audience": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "url",
                          "clientId",
                          "clientSecret",
                          "audience"
                        ],
                        "additionalProperties": false
                      },
                      "eventReportingUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "adminApiUrl": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "required": [
                      "auth",
                      "eventReportingUrl",
                      "adminApiUrl"
                    ],
                    "additionalProperties": false
                  },
                  "suspensions": {
                    "type": "object",
                    "properties": {
                      "agents": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "enforceMfaOn": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      },
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Update organization by id",
        "description": "**required scopes:** `contextual:organizations:update`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "baseDomain": {
                    "type": "string"
                  },
                  "features": {
                    "type": "object",
                    "properties": {
                      "mfa": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "featureLimits": {
                    "type": "object",
                    "properties": {
                      "maxUsers": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxObjectTypes": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxRecords": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxTopics": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxPartitions": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAgentPods": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxInstancesPerAgent": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxEvents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxCustomDomainedAgents": {
                        "default": -1,
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxAiSearchEmbeddingEventHandlerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLogRetentionDays": {
                        "default": 1,
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 7
                          },
                          {
                            "type": "number",
                            "const": 30
                          }
                        ]
                      },
                      "maxTriggerPartitions": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxTriggerReplicas": {
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "maxUsers",
                      "maxObjectTypes",
                      "maxRecords",
                      "maxTopics",
                      "maxPartitions",
                      "maxAgents",
                      "maxAgentPods",
                      "maxInstancesPerAgent",
                      "maxEvents",
                      "maxCustomDomainedAgents",
                      "maxAiSearchEventHandlerPartitions",
                      "maxAiSearchEventHandlerReplicas",
                      "maxAiSearchEmbeddingEventHandlerPartitions",
                      "maxAiSearchEmbeddingEventHandlerReplicas",
                      "maxLogPartitions",
                      "maxLogReplicas",
                      "maxLogRetentionDays",
                      "maxTriggerPartitions",
                      "maxTriggerReplicas"
                    ],
                    "additionalProperties": false
                  },
                  "bssConnection": {
                    "type": "object",
                    "properties": {
                      "auth": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "audience": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "url",
                          "clientId",
                          "clientSecret",
                          "audience"
                        ],
                        "additionalProperties": false
                      },
                      "eventReportingUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "adminApiUrl": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "required": [
                      "auth",
                      "eventReportingUrl",
                      "adminApiUrl"
                    ],
                    "additionalProperties": false
                  },
                  "suspensions": {
                    "type": "object",
                    "properties": {
                      "agents": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "enforceMfaOn": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Delete organization by id",
        "description": "**required scopes:** `contextual:organizations:delete`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Organization deleted successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/certificate-statuses": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get organization certificate statuses by id",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "primary": {
                      "type": "boolean"
                    },
                    "services": {
                      "type": "boolean"
                    },
                    "flow": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "primary",
                    "services",
                    "flow"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      }
    },
    "/organization/certificate-statuses": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get organization certificate statuses by id",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "primary": {
                      "type": "boolean"
                    },
                    "services": {
                      "type": "boolean"
                    },
                    "flow": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "primary",
                    "services",
                    "flow"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/synchronize": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Synchronize native objects and their data stores for an organization by id",
        "description": "**required scopes:** `contextual:organizations:create`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aksNamespace": {
                    "type": "string"
                  },
                  "confluentClusterId": {
                    "type": "string"
                  },
                  "confluentEnvId": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Organization successfully synchronized",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      }
    },
    "/organization/synchronize": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Synchronize native objects and their data stores for an organization by id",
        "description": "**required scopes:** `contextual:organizations:create`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aksNamespace": {
                    "type": "string"
                  },
                  "confluentClusterId": {
                    "type": "string"
                  },
                  "confluentEnvId": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Synchronization requested for organization",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/synchronize": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Synchronize native objects and their data stores for all organizations",
        "parameters": [],
        "deprecated": false,
        "responses": {
          "202": {
            "description": "Synchronization requested for all organizations",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/resource-servers": {
      "get": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Get resource servers",
        "description": "**required scopes:** `contextual:resource-servers:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceServer"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Create a resource server",
        "description": "**required scopes:** `contextual:resource-servers:create`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "identifier": {
                    "type": "string"
                  },
                  "allow_offline_access": {
                    "type": "boolean",
                    "const": false
                  },
                  "token_lifetime": {
                    "type": "number"
                  },
                  "signing_alg": {
                    "type": "string",
                    "const": "RS256"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "identifier",
                  "allow_offline_access",
                  "token_lifetime",
                  "signing_alg",
                  "scopes",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceServer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/resource-servers": {
      "get": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Get resource servers",
        "description": "**required scopes:** `contextual:resource-servers:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceServer"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Create a resource server",
        "description": "**required scopes:** `contextual:resource-servers:create`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "identifier": {
                    "type": "string"
                  },
                  "allow_offline_access": {
                    "type": "boolean",
                    "const": false
                  },
                  "token_lifetime": {
                    "type": "number"
                  },
                  "signing_alg": {
                    "type": "string",
                    "const": "RS256"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "identifier",
                  "allow_offline_access",
                  "token_lifetime",
                  "signing_alg",
                  "scopes",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceServer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/organizations/{organizationId}/resource-servers": {
      "post": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Page resource servers",
        "description": "**required scopes:** `contextual:resource-servers:read`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceServer"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/resource-servers": {
      "post": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Page resource servers",
        "description": "**required scopes:** `contextual:resource-servers:read`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResourceServer"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/resource-servers/{id}": {
      "get": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Get resource server by id",
        "description": "**required scopes:** `contextual:resource-servers:read`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceServer"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource server not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Update resource server by id",
        "description": "**required scopes:** `contextual:resource-servers:update`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "allow_offline_access": {
                    "type": "boolean",
                    "const": false
                  },
                  "token_lifetime": {
                    "type": "number"
                  },
                  "signing_alg": {
                    "type": "string",
                    "const": "RS256"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "allow_offline_access",
                  "token_lifetime",
                  "signing_alg",
                  "scopes",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceServer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource server not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Delete resource server by id",
        "description": "**required scopes:** `contextual:resource-servers:delete`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Resource server deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid resource server id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource server not found",
            "content": {}
          }
        }
      }
    },
    "/resource-servers/{id}": {
      "get": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Get resource server by id",
        "description": "**required scopes:** `contextual:resource-servers:read`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceServer"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource server not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Update resource server by id",
        "description": "**required scopes:** `contextual:resource-servers:update`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "allow_offline_access": {
                    "type": "boolean",
                    "const": false
                  },
                  "token_lifetime": {
                    "type": "number"
                  },
                  "signing_alg": {
                    "type": "string",
                    "const": "RS256"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "allow_offline_access",
                  "token_lifetime",
                  "signing_alg",
                  "scopes",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceServer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource server not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Resource servers"
        ],
        "summary": "Delete resource server by id",
        "description": "**required scopes:** `contextual:resource-servers:delete`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Resource server deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid resource server id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource server not found",
            "content": {}
          }
        }
      }
    },
    "/organizations/{organizationId}/roles": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Get roles",
        "description": "**required scopes:** `contextual:roles:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Role"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Create a role",
        "description": "**required scopes:** `contextual:roles:create`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  },
                  "maxUsers": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "permissions",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/roles": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Get roles",
        "description": "**required scopes:** `contextual:roles:read`",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Role"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Create a role",
        "description": "**required scopes:** `contextual:roles:create`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  },
                  "maxUsers": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "permissions",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/organizations/{organizationId}/roles": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Page roles",
        "description": "**required scopes:** `contextual:roles:read`",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Role"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$page/roles": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Page roles",
        "description": "**required scopes:** `contextual:roles:read`",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Role"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/roles/{roleId}": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Get role by id",
        "description": "**required scopes:** `contextual:roles:read`",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Role not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Roles"
        ],
        "summary": "Update role by id",
        "description": "**required scopes:** `contextual:roles:update`",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  },
                  "maxUsers": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "permissions",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Role not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Roles"
        ],
        "summary": "Delete role by id",
        "description": "**required scopes:** `contextual:roles:delete`",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Role deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid role id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Role not found",
            "content": {}
          }
        }
      }
    },
    "/roles/{roleId}": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Get role by id",
        "description": "**required scopes:** `contextual:roles:read`",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Role not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Roles"
        ],
        "summary": "Update role by id",
        "description": "**required scopes:** `contextual:roles:update`",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "system": {
                    "default": false,
                    "type": "boolean"
                  },
                  "maxUsers": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "permissions",
                  "system"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Role not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Roles"
        ],
        "summary": "Delete role by id",
        "description": "**required scopes:** `contextual:roles:delete`",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Role deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid role id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Role not found",
            "content": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "jwt": []
    }
  ],
  "components": {
    "schemas": {
      "$ListQuery": {
        "type": "object",
        "properties": {
          "pageToken": {
            "type": "string",
            "minLength": 1
          },
          "orderBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "pageSize": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "includeTotal": {
            "type": "boolean"
          },
          "filterMode": {
            "anyOf": [
              {
                "type": "string",
                "const": "AND"
              },
              {
                "type": "string",
                "const": "OR"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "$ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "number"
            ]
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ClientGrant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "resource_server_id": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            }
          },
          "_metaData": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "client_id",
          "resource_server_id",
          "scopes",
          "_metaData"
        ],
        "additionalProperties": false
      },
      "Client": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_secret": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "client_type": {
            "type": "string",
            "const": "non_interactive"
          },
          "is_active": {
            "default": true,
            "type": "boolean"
          },
          "system": {
            "default": false,
            "type": "boolean"
          },
          "_metaData": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "client_id",
          "client_secret",
          "name",
          "client_type",
          "is_active",
          "system",
          "_metaData"
        ],
        "additionalProperties": false
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "roles": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "fullName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "_metaData": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "roles",
          "_metaData"
        ],
        "additionalProperties": false
      },
      "UserPermissions": {
        "type": "object",
        "properties": {
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isSuperAdmin": {
            "type": "boolean"
          }
        },
        "required": [
          "permissions",
          "isSuperAdmin"
        ],
        "additionalProperties": false
      },
      "Invitation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": "string",
            "minLength": 1
          },
          "organization": {
            "type": "string",
            "minLength": 1
          },
          "roles": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "expiresAt": {
            "type": "string",
            "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
            "description": "An ISO 8601 date time string",
            "format": "date-time"
          },
          "accepted": {
            "type": "boolean"
          },
          "_metaData": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "email",
          "organization",
          "roles",
          "expiresAt",
          "_metaData"
        ],
        "additionalProperties": false
      },
      "Organization": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "baseDomain": {
            "type": "string"
          },
          "features": {
            "type": "object",
            "properties": {
              "mfa": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "featureLimits": {
            "type": "object",
            "properties": {
              "maxUsers": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxObjectTypes": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxRecords": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxTopics": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxPartitions": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxAgents": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxAgentPods": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxInstancesPerAgent": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxEvents": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxCustomDomainedAgents": {
                "default": -1,
                "type": "integer",
                "minimum": -1,
                "maximum": 9007199254740991
              },
              "maxAiSearchEventHandlerPartitions": {
                "default": 1,
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "maxAiSearchEventHandlerReplicas": {
                "default": 1,
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "maxAiSearchEmbeddingEventHandlerPartitions": {
                "default": 1,
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "maxAiSearchEmbeddingEventHandlerReplicas": {
                "default": 1,
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "maxLogPartitions": {
                "default": 1,
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "maxLogReplicas": {
                "default": 1,
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "maxLogRetentionDays": {
                "default": 1,
                "anyOf": [
                  {
                    "type": "number",
                    "const": 1
                  },
                  {
                    "type": "number",
                    "const": 7
                  },
                  {
                    "type": "number",
                    "const": 30
                  }
                ]
              },
              "maxTriggerPartitions": {
                "default": 1,
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "maxTriggerReplicas": {
                "default": 1,
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "maxUsers",
              "maxObjectTypes",
              "maxRecords",
              "maxTopics",
              "maxPartitions",
              "maxAgents",
              "maxAgentPods",
              "maxInstancesPerAgent",
              "maxEvents",
              "maxCustomDomainedAgents",
              "maxAiSearchEventHandlerPartitions",
              "maxAiSearchEventHandlerReplicas",
              "maxAiSearchEmbeddingEventHandlerPartitions",
              "maxAiSearchEmbeddingEventHandlerReplicas",
              "maxLogPartitions",
              "maxLogReplicas",
              "maxLogRetentionDays",
              "maxTriggerPartitions",
              "maxTriggerReplicas"
            ],
            "additionalProperties": false
          },
          "bssConnection": {
            "type": "object",
            "properties": {
              "auth": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "clientId": {
                    "type": "string"
                  },
                  "clientSecret": {
                    "type": "string"
                  },
                  "audience": {
                    "type": "string"
                  }
                },
                "required": [
                  "url",
                  "clientId",
                  "clientSecret",
                  "audience"
                ],
                "additionalProperties": false
              },
              "eventReportingUrl": {
                "type": "string",
                "format": "uri"
              },
              "adminApiUrl": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "auth",
              "eventReportingUrl",
              "adminApiUrl"
            ],
            "additionalProperties": false
          },
          "suspensions": {
            "type": "object",
            "properties": {
              "agents": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "enforceMfaOn": {
            "type": "string",
            "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
            "description": "An ISO 8601 date time string",
            "format": "date-time"
          },
          "_metaData": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "_metaData"
        ],
        "additionalProperties": false
      },
      "ResourceServer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "allow_offline_access": {
            "type": "boolean",
            "const": false
          },
          "token_lifetime": {
            "type": "number"
          },
          "signing_alg": {
            "type": "string",
            "const": "RS256"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "minLength": 1
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "value"
              ],
              "additionalProperties": false
            }
          },
          "system": {
            "default": false,
            "type": "boolean"
          },
          "_metaData": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "identifier",
          "allow_offline_access",
          "token_lifetime",
          "signing_alg",
          "scopes",
          "system",
          "_metaData"
        ],
        "additionalProperties": false
      },
      "Role": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "system": {
            "default": false,
            "type": "boolean"
          },
          "maxUsers": {
            "type": "number"
          },
          "_metaData": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "permissions",
          "system",
          "_metaData"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "info": {
    "title": "Contextual Auth API",
    "description": " "
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ]
}
