{
  "openapi": "3.1.0",
  "info": {
    "title": "Beru API",
    "description": "Beru turns your documents into answers your app can trust: hybrid retrieval,\ncited answers, and per-end-user private data.\n\nAuthenticate with a project API key: `Authorization: Bearer beru_sk_\u2026`.\nErrors always look like `{\"error\": {\"code\", \"message\", \"request_id\"}}`.\n",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/documents": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "Upload a file or add a URL",
        "description": "Multipart with `file`, or JSON `{url, end_user_id?, metadata?}`. Processing is\nasynchronous: poll the document or wait for the `document.ready` webhook.",
        "operationId": "create_document_v1_documents_post",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_document_v1_documents_post"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "List documents",
        "operationId": "list_documents_v1_documents_get",
        "parameters": [
          {
            "name": "end_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "title": "End User Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "queued",
                    "processing",
                    "ready",
                    "failed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentList"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/documents/{document_id}": {
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "Get a document and its processing status",
        "operationId": "get_document_v1_documents__document_id__get",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Document Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "delete": {
        "tags": [
          "v1"
        ],
        "summary": "Delete a document, its chunks and the raw file",
        "operationId": "delete_document_v1_documents__document_id__delete",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Document Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/retrieve": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "Find the most relevant passages",
        "operationId": "retrieve_v1_retrieve_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetrieveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetrieveResponse"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/answer": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "Answer a question with citations",
        "description": "With `stream: true` the response is Server-Sent Events: `delta` events carry\n`{text}`, then one `done` event carries the full answer object.",
        "operationId": "answer_v1_answer_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnswerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnswerResponse"
                }
              },
              "text/event-stream": {}
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/feedback": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "Rate an answer",
        "operationId": "feedback_v1_feedback_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/memories": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "Remember facts about an end user",
        "description": "Send `messages` and facts are extracted in the background with your LLM key\n(202), or send one `fact` to store it directly (201). Near-duplicates update the\nexisting fact; a fact that contradicts an older one supersedes it.",
        "operationId": "create_memory_v1_memories_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Memory"
                    },
                    {
                      "$ref": "#/components/schemas/MemoryExtractionQueued"
                    }
                  ],
                  "title": "Response Create Memory V1 Memories Post"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryExtractionQueued"
                }
              }
            },
            "description": "Accepted"
          }
        }
      },
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "List or search memories",
        "operationId": "list_memories_v1_memories_get",
        "parameters": [
          {
            "name": "end_user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "title": "End User Id"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1000
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "name": "include_superseded",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Superseded"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryList"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/memories/{memory_id}": {
      "delete": {
        "tags": [
          "v1"
        ],
        "summary": "Delete one memory",
        "operationId": "delete_memory_v1_memories__memory_id__delete",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Memory Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/end-users/{external_id}": {
      "delete": {
        "tags": [
          "v1"
        ],
        "summary": "Erase everything about one end user",
        "description": "Hard-deletes their private documents and files, chunks, memories, messages and\nquery logs, immediately. Only a hash of the id is kept, as proof of erasure.",
        "operationId": "erase_end_user_v1_end_users__external_id__delete",
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "title": "External Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErasureResult"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "Usage this period against plan limits",
        "operationId": "usage_v1_usage_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/me": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Me",
        "operationId": "me_console_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/account/privacy": {
      "put": {
        "tags": [
          "console"
        ],
        "summary": "Update Privacy",
        "description": "How long question history and chats are kept. Owner only.",
        "operationId": "update_privacy_console_account_privacy_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivacySettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivacySettings"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/account/history/delete": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Delete History",
        "description": "Delete every question, answer and chat now. Remembered facts and usage stay.",
        "operationId": "delete_history_console_account_history_delete_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryDeleted"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/account/exports": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "List Exports",
        "description": "The most recent data exports and whether each can be downloaded.",
        "operationId": "list_exports_console_account_exports_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DataExport"
                  },
                  "type": "array",
                  "title": "Response List Exports Console Account Exports Get"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Request Export",
        "description": "Start building an archive of everything the organisation stores. Owner only.\n\nOne at a time, five a day. Poll the list; the download works for 24 hours.",
        "operationId": "request_export_console_account_exports_post",
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExport"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/account/exports/{export_id}/download": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Download Export",
        "operationId": "download_export_console_account_exports__export_id__download_get",
        "parameters": [
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Export Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/zip": {}
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/account/close": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Close Account",
        "description": "Delete the organisation and everything in it, for good.\n\nOwner only. Every sign-in, API key and website chat stops at once; the\nsubscription ends now without a refund; files and data are deleted.",
        "operationId": "close_account_console_account_close_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/templates": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Templates",
        "operationId": "templates_console_templates_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TemplateInfo"
                  },
                  "type": "array",
                  "title": "Response Templates Console Templates Get"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/projects": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "List Projects",
        "operationId": "list_projects_console_projects_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  },
                  "type": "array",
                  "title": "Response List Projects Console Projects Get"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Create Project",
        "operationId": "create_project_console_projects_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/projects/{project_id}": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Get Project",
        "operationId": "get_project_console_projects__project_id__get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "patch": {
        "tags": [
          "console"
        ],
        "summary": "Update Project",
        "operationId": "update_project_console_projects__project_id__patch",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/starter-questions": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Starter Questions",
        "description": "Up to six questions the project's ready documents answer, for the onboarding test\nstep; the template's questions when there are no documents or no model.",
        "operationId": "starter_questions_console_projects__project_id__starter_questions_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StarterQuestions"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/api-keys": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "List Api Keys",
        "operationId": "list_api_keys_console_projects__project_id__api_keys_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKey"
                  },
                  "title": "Response List Api Keys Console Projects  Project Id  Api Keys Get"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Create Api Key",
        "operationId": "create_api_key_console_projects__project_id__api_keys_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreated"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/api-keys/{key_id}": {
      "delete": {
        "tags": [
          "console"
        ],
        "summary": "Revoke Api Key",
        "operationId": "revoke_api_key_console_projects__project_id__api_keys__key_id__delete",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/webhooks": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "List Webhooks",
        "operationId": "list_webhooks_console_projects__project_id__webhooks_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEndpoint"
                  },
                  "title": "Response List Webhooks Console Projects  Project Id  Webhooks Get"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Create Webhook",
        "description": "Up to 5 per project. The URL must be https on a public address.",
        "operationId": "create_webhook_console_projects__project_id__webhooks_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointWithSecret"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/webhooks/{endpoint_id}": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Reveal Webhook",
        "operationId": "reveal_webhook_console_projects__project_id__webhooks__endpoint_id__get",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointWithSecret"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "patch": {
        "tags": [
          "console"
        ],
        "summary": "Update Webhook",
        "operationId": "update_webhook_console_projects__project_id__webhooks__endpoint_id__patch",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointWithSecret"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "delete": {
        "tags": [
          "console"
        ],
        "summary": "Delete Webhook",
        "operationId": "delete_webhook_console_projects__project_id__webhooks__endpoint_id__delete",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/webhooks/{endpoint_id}/rotate-secret": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Rotate Webhook Secret",
        "operationId": "rotate_webhook_secret_console_projects__project_id__webhooks__endpoint_id__rotate_secret_post",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointWithSecret"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/webhooks/{endpoint_id}/test": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Test Webhook",
        "description": "Queue a `webhook.test` event to this endpoint.",
        "operationId": "test_webhook_console_projects__project_id__webhooks__endpoint_id__test_post",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/webhooks/{endpoint_id}/deliveries": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "List Webhook Deliveries",
        "description": "The 50 most recent, newest first.",
        "operationId": "list_webhook_deliveries_console_projects__project_id__webhooks__endpoint_id__deliveries_get",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookDelivery"
                  },
                  "title": "Response List Webhook Deliveries Console Projects  Project Id  Webhooks  Endpoint Id  Deliveries Get"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/webhook-deliveries/{delivery_id}/resend": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Resend Webhook",
        "description": "Send the same event (same id) again; one still being retried is left as it is.",
        "operationId": "resend_webhook_console_projects__project_id__webhook_deliveries__delivery_id__resend_post",
        "parameters": [
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Delivery Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/end-users": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "List End Users",
        "operationId": "list_end_users_console_projects__project_id__end_users_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EndUserSummary"
                  },
                  "title": "Response List End Users Console Projects  Project Id  End Users Get"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/inbox": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Inbox",
        "description": "Questions from the last 30 days with no grounded answer or a thumbs-down,\ngrouped by similarity, most-asked first.",
        "operationId": "inbox_console_projects__project_id__inbox_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InboxGroup"
                  },
                  "title": "Response Inbox Console Projects  Project Id  Inbox Get"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/inbox/resolve": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Resolve Inbox",
        "operationId": "resolve_inbox_console_projects__project_id__inbox_resolve_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/pinned-answers": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "List Pinned",
        "operationId": "list_pinned_console_projects__project_id__pinned_answers_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PinnedAnswer"
                  },
                  "title": "Response List Pinned Console Projects  Project Id  Pinned Answers Get"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Pin Answer",
        "operationId": "pin_answer_console_projects__project_id__pinned_answers_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PinnedAnswerCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PinnedAnswer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/pinned-answers/{pinned_id}": {
      "delete": {
        "tags": [
          "console"
        ],
        "summary": "Unpin",
        "operationId": "unpin_console_projects__project_id__pinned_answers__pinned_id__delete",
        "parameters": [
          {
            "name": "pinned_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Pinned Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/billing": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "Billing Options",
        "operationId": "billing_options_console_billing_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingOptions"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/billing/coupons/check": {
      "post": {
        "tags": [
          "billing"
        ],
        "summary": "Check Coupon",
        "description": "What a code gives this account, or why it can't be used. Checked again at checkout.",
        "operationId": "check_coupon_console_billing_coupons_check_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CouponCheckRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CouponCheckResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/usage": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "Org Usage",
        "description": "Usage across all projects this period, for the Usage and billing screen.",
        "operationId": "org_usage_console_usage_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/billing/spending-cap": {
      "put": {
        "tags": [
          "billing"
        ],
        "summary": "Update Spending Cap",
        "operationId": "update_spending_cap_console_billing_spending_cap_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpendingCapRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/billing/coupons/redeem": {
      "post": {
        "tags": [
          "billing"
        ],
        "summary": "Redeem Free Coupon",
        "description": "A 100%-off code: the plan is free at once until its last day. No checkout, no card.",
        "operationId": "redeem_free_coupon_console_billing_coupons_redeem_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CouponRedeemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CouponRedeemResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/billing/checkout": {
      "post": {
        "tags": [
          "billing"
        ],
        "summary": "Start Checkout",
        "description": "Where to send the owner to pay for a plan.",
        "operationId": "start_checkout_console_billing_checkout_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedirectUrl"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/billing/portal": {
      "post": {
        "tags": [
          "billing"
        ],
        "summary": "Open Portal",
        "description": "The gateway's page for changing plan, card, invoices and cancelling.",
        "operationId": "open_portal_console_billing_portal_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedirectUrl"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/console/projects/{project_id}/channels/web": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Get Web Channel",
        "operationId": "get_web_channel_console_projects__project_id__channels_web_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebChannelState"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "put": {
        "tags": [
          "console"
        ],
        "summary": "Save Web Channel",
        "description": "Creates the channel (and its public key) the first time.",
        "operationId": "save_web_channel_console_projects__project_id__channels_web_put",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebChannelUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebChannel"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/channels/web/rotate-key": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Rotate Web Channel Key",
        "operationId": "rotate_web_channel_key_console_projects__project_id__channels_web_rotate_key_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebChannel"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/public/v1/widget/{public_key}": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Widget Config",
        "description": "What the widget shows before the first message.",
        "operationId": "widget_config_public_v1_widget__public_key__get",
        "parameters": [
          {
            "name": "public_key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Public Key"
            }
          },
          {
            "name": "origin",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Origin"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WidgetConfig"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/public/v1/chat": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Chat",
        "description": "With `stream: true` (the default): `delta` events with `{text}`, then `done`.",
        "operationId": "chat_public_v1_chat_post",
        "parameters": [
          {
            "name": "origin",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Origin"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicChatRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAnswer"
                }
              },
              "text/event-stream": {}
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/public/v1/feedback": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Feedback",
        "description": "A visitor rates one of their own answers; it shows up in the console's inbox.",
        "operationId": "feedback_public_v1_feedback_post",
        "parameters": [
          {
            "name": "origin",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Origin"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicFeedbackRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/overview": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "Overview",
        "operationId": "overview_admin_overview_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOverview"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/admin/orgs": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "List Orgs",
        "operationId": "list_orgs_admin_orgs_get",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200,
              "default": "",
              "title": "Search"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgList"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/orgs/{org_id}": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "Org Detail",
        "operationId": "org_detail_admin_orgs__org_id__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/orgs/{org_id}/complimentary": {
      "put": {
        "tags": [
          "admin"
        ],
        "summary": "Set Complimentary",
        "description": "Free access on a plan, until a day (included) or with no end date.",
        "operationId": "set_complimentary_admin_orgs__org_id__complimentary_put",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminComplimentaryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/orgs/{org_id}/complimentary/end": {
      "post": {
        "tags": [
          "admin"
        ],
        "summary": "End Complimentary",
        "operationId": "end_complimentary_admin_orgs__org_id__complimentary_end_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminNoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/orgs/{org_id}/plan": {
      "put": {
        "tags": [
          "admin"
        ],
        "summary": "Change Plan",
        "description": "Complimentary: changes at once. Paying: changes the gateway subscription\n(prorated, any code's discount stays).",
        "operationId": "change_plan_admin_orgs__org_id__plan_put",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPlanRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/orgs/{org_id}/subscription/cancel": {
      "post": {
        "tags": [
          "admin"
        ],
        "summary": "Cancel Subscription",
        "description": "`now`: access stops at once, no refund. `period_end`: it doesn't renew.",
        "operationId": "cancel_subscription_admin_orgs__org_id__subscription_cancel_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminCancelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/orgs/{org_id}/subscription/keep": {
      "post": {
        "tags": [
          "admin"
        ],
        "summary": "Keep Subscription",
        "description": "Undo a cancellation set for the end of the period.",
        "operationId": "keep_subscription_admin_orgs__org_id__subscription_keep_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminNoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/orgs/{org_id}/internal": {
      "put": {
        "tags": [
          "admin"
        ],
        "summary": "Set Internal",
        "description": "Internal (our own or test) accounts are left out of the Reach report.",
        "operationId": "set_internal_admin_orgs__org_id__internal_put",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminInternalRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/reach": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "Reach Report",
        "description": "How people find Beru and how far they get, this period and the one before.",
        "operationId": "reach_report_admin_reach_get",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 90,
              "minimum": 1,
              "default": 7,
              "title": "Days"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminReach"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/orgs/{org_id}/suspend": {
      "post": {
        "tags": [
          "admin"
        ],
        "summary": "Suspend",
        "operationId": "suspend_admin_orgs__org_id__suspend_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSuspendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/orgs/{org_id}/restore": {
      "post": {
        "tags": [
          "admin"
        ],
        "summary": "Restore",
        "operationId": "restore_admin_orgs__org_id__restore_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminNoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/coupons": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "List Coupons",
        "operationId": "list_coupons_admin_coupons_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AdminCoupon"
                  },
                  "type": "array",
                  "title": "Response List Coupons Admin Coupons Get"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin"
        ],
        "summary": "Create Coupon",
        "operationId": "create_coupon_admin_coupons_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminCouponCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCoupon"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/admin/coupons/{coupon_id}": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "Coupon Detail",
        "operationId": "coupon_detail_admin_coupons__coupon_id__get",
        "parameters": [
          {
            "name": "coupon_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Coupon Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCouponDetail"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "patch": {
        "tags": [
          "admin"
        ],
        "summary": "Update Coupon",
        "description": "Discount and length are fixed once made; everything else can change. Send\nnull for valid_from, valid_until or max_uses to remove that limit.",
        "operationId": "update_coupon_admin_coupons__coupon_id__patch",
        "parameters": [
          {
            "name": "coupon_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Coupon Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminCouponUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCoupon"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/admin/activity": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "Activity",
        "operationId": "activity_admin_activity_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminActivity"
                  },
                  "title": "Response Activity Admin Activity Get"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/documents": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Upload a file or add a URL",
        "description": "Multipart with `file`, or JSON `{url, end_user_id?, metadata?}`. Processing is\nasynchronous: poll the document or wait for the `document.ready` webhook.",
        "operationId": "create_document_console_projects__project_id__documents_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_document_console_projects__project_id__documents_post"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "get": {
        "tags": [
          "console"
        ],
        "summary": "List documents",
        "operationId": "list_documents_console_projects__project_id__documents_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "title": "End User Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "queued",
                    "processing",
                    "ready",
                    "failed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentList"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/documents/{document_id}": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Get a document and its processing status",
        "operationId": "get_document_console_projects__project_id__documents__document_id__get",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Document Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      },
      "delete": {
        "tags": [
          "console"
        ],
        "summary": "Delete a document, its chunks and the raw file",
        "operationId": "delete_document_console_projects__project_id__documents__document_id__delete",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Document Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/retrieve": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Find the most relevant passages",
        "operationId": "retrieve_console_projects__project_id__retrieve_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetrieveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetrieveResponse"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/answer": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Answer a question with citations",
        "description": "With `stream: true` the response is Server-Sent Events: `delta` events carry\n`{text}`, then one `done` event carries the full answer object.",
        "operationId": "answer_console_projects__project_id__answer_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnswerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnswerResponse"
                }
              },
              "text/event-stream": {}
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/feedback": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Rate an answer",
        "operationId": "feedback_console_projects__project_id__feedback_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/memories": {
      "post": {
        "tags": [
          "console"
        ],
        "summary": "Remember facts about an end user",
        "description": "Send `messages` and facts are extracted in the background with your LLM key\n(202), or send one `fact` to store it directly (201). Near-duplicates update the\nexisting fact; a fact that contradicts an older one supersedes it.",
        "operationId": "create_memory_console_projects__project_id__memories_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Memory"
                    },
                    {
                      "$ref": "#/components/schemas/MemoryExtractionQueued"
                    }
                  ],
                  "title": "Response Create Memory Console Projects  Project Id  Memories Post"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryExtractionQueued"
                }
              }
            },
            "description": "Accepted"
          }
        }
      },
      "get": {
        "tags": [
          "console"
        ],
        "summary": "List or search memories",
        "operationId": "list_memories_console_projects__project_id__memories_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "title": "End User Id"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1000
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "name": "include_superseded",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Superseded"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryList"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/memories/{memory_id}": {
      "delete": {
        "tags": [
          "console"
        ],
        "summary": "Delete one memory",
        "operationId": "delete_memory_console_projects__project_id__memories__memory_id__delete",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Memory Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/end-users/{external_id}": {
      "delete": {
        "tags": [
          "console"
        ],
        "summary": "Erase everything about one end user",
        "description": "Hard-deletes their private documents and files, chunks, memories, messages and\nquery logs, immediately. Only a hash of the id is kept, as proof of erasure.",
        "operationId": "erase_end_user_console_projects__project_id__end_users__external_id__delete",
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "title": "External Id"
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErasureResult"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/console/projects/{project_id}/usage": {
      "get": {
        "tags": [
          "console"
        ],
        "summary": "Usage this period against plan limits",
        "operationId": "usage_console_projects__project_id__usage_get",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdminActivity": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "admin_email": {
            "type": "string",
            "title": "Admin Email"
          },
          "action": {
            "type": "string",
            "title": "Action"
          },
          "org_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id"
          },
          "coupon_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coupon Id"
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "admin_email",
          "action",
          "org_id",
          "coupon_id",
          "details",
          "created_at"
        ],
        "title": "AdminActivity"
      },
      "AdminCancelRequest": {
        "properties": {
          "when": {
            "type": "string",
            "enum": [
              "now",
              "period_end"
            ],
            "title": "When"
          },
          "note": {
            "type": "string",
            "maxLength": 500,
            "title": "Note",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "when"
        ],
        "title": "AdminCancelRequest"
      },
      "AdminCodeUse": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "percent_off": {
            "type": "integer",
            "title": "Percent Off"
          },
          "duration_months": {
            "type": "integer",
            "title": "Duration Months"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "redeemed"
            ],
            "title": "Status"
          },
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "billing_interval": {
            "type": "string",
            "enum": [
              "monthly",
              "annual"
            ],
            "title": "Billing Interval"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At"
          },
          "redeemed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redeemed At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "percent_off",
          "duration_months",
          "status",
          "plan",
          "billing_interval",
          "started_at",
          "redeemed_at"
        ],
        "title": "AdminCodeUse"
      },
      "AdminComplimentaryRequest": {
        "properties": {
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Until"
          },
          "note": {
            "type": "string",
            "maxLength": 500,
            "title": "Note",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plan"
        ],
        "title": "AdminComplimentaryRequest"
      },
      "AdminCoupon": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "percent_off": {
            "type": "integer",
            "title": "Percent Off"
          },
          "duration_months": {
            "type": "integer",
            "title": "Duration Months"
          },
          "plans": {
            "items": {
              "type": "string",
              "enum": [
                "try",
                "build",
                "scale"
              ]
            },
            "type": "array",
            "title": "Plans"
          },
          "intervals": {
            "items": {
              "type": "string",
              "enum": [
                "monthly",
                "annual"
              ]
            },
            "type": "array",
            "title": "Intervals"
          },
          "valid_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid From"
          },
          "valid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid Until"
          },
          "max_uses": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses"
          },
          "new_customers_only": {
            "type": "boolean",
            "title": "New Customers Only"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "note": {
            "type": "string",
            "title": "Note"
          },
          "payment_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Provider"
          },
          "provider_coupon_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Coupon Id"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "redeemed": {
            "type": "integer",
            "title": "Redeemed"
          },
          "pending": {
            "type": "integer",
            "title": "Pending"
          },
          "failed_attempts": {
            "type": "integer",
            "title": "Failed Attempts"
          },
          "summary": {
            "type": "string",
            "title": "Summary"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "code",
          "percent_off",
          "duration_months",
          "plans",
          "intervals",
          "valid_from",
          "valid_until",
          "max_uses",
          "new_customers_only",
          "active",
          "note",
          "payment_provider",
          "provider_coupon_id",
          "created_by",
          "created_at",
          "updated_at",
          "redeemed",
          "pending",
          "failed_attempts",
          "summary"
        ],
        "title": "AdminCoupon"
      },
      "AdminCouponCreate": {
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{3,32}$",
            "title": "Code"
          },
          "percent_off": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Percent Off"
          },
          "duration_months": {
            "type": "integer",
            "maximum": 24.0,
            "minimum": 1.0,
            "title": "Duration Months"
          },
          "plans": {
            "items": {
              "type": "string",
              "enum": [
                "try",
                "build",
                "scale"
              ]
            },
            "type": "array",
            "minItems": 1,
            "title": "Plans"
          },
          "intervals": {
            "items": {
              "type": "string",
              "enum": [
                "monthly",
                "annual"
              ]
            },
            "type": "array",
            "minItems": 1,
            "title": "Intervals"
          },
          "valid_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid From"
          },
          "valid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid Until"
          },
          "max_uses": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses"
          },
          "new_customers_only": {
            "type": "boolean",
            "title": "New Customers Only",
            "default": true
          },
          "active": {
            "type": "boolean",
            "title": "Active",
            "default": true
          },
          "note": {
            "type": "string",
            "maxLength": 500,
            "title": "Note",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "percent_off",
          "duration_months",
          "plans"
        ],
        "title": "AdminCouponCreate"
      },
      "AdminCouponDetail": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "percent_off": {
            "type": "integer",
            "title": "Percent Off"
          },
          "duration_months": {
            "type": "integer",
            "title": "Duration Months"
          },
          "plans": {
            "items": {
              "type": "string",
              "enum": [
                "try",
                "build",
                "scale"
              ]
            },
            "type": "array",
            "title": "Plans"
          },
          "intervals": {
            "items": {
              "type": "string",
              "enum": [
                "monthly",
                "annual"
              ]
            },
            "type": "array",
            "title": "Intervals"
          },
          "valid_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid From"
          },
          "valid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid Until"
          },
          "max_uses": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses"
          },
          "new_customers_only": {
            "type": "boolean",
            "title": "New Customers Only"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "note": {
            "type": "string",
            "title": "Note"
          },
          "payment_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Provider"
          },
          "provider_coupon_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Coupon Id"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "redeemed": {
            "type": "integer",
            "title": "Redeemed"
          },
          "pending": {
            "type": "integer",
            "title": "Pending"
          },
          "failed_attempts": {
            "type": "integer",
            "title": "Failed Attempts"
          },
          "summary": {
            "type": "string",
            "title": "Summary"
          },
          "redemptions": {
            "items": {
              "$ref": "#/components/schemas/AdminCouponUse"
            },
            "type": "array",
            "title": "Redemptions"
          },
          "attempts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Attempts"
          },
          "activity": {
            "items": {
              "$ref": "#/components/schemas/AdminActivity"
            },
            "type": "array",
            "title": "Activity"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "code",
          "percent_off",
          "duration_months",
          "plans",
          "intervals",
          "valid_from",
          "valid_until",
          "max_uses",
          "new_customers_only",
          "active",
          "note",
          "payment_provider",
          "provider_coupon_id",
          "created_by",
          "created_at",
          "updated_at",
          "redeemed",
          "pending",
          "failed_attempts",
          "summary",
          "redemptions",
          "attempts",
          "activity"
        ],
        "title": "AdminCouponDetail"
      },
      "AdminCouponUpdate": {
        "properties": {
          "active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active"
          },
          "valid_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid From"
          },
          "valid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid Until"
          },
          "max_uses": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses"
          },
          "plans": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "try",
                    "build",
                    "scale"
                  ]
                },
                "type": "array",
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Plans"
          },
          "intervals": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "monthly",
                    "annual"
                  ]
                },
                "type": "array",
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Intervals"
          },
          "new_customers_only": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Customers Only"
          },
          "note": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "AdminCouponUpdate"
      },
      "AdminCouponUse": {
        "properties": {
          "org_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id"
          },
          "org_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Name"
          },
          "owner_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Email"
          },
          "org_billing_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "unpaid",
                  "active",
                  "past_due",
                  "cancelled",
                  "complimentary",
                  "demo"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Billing Status"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "redeemed"
            ],
            "title": "Status"
          },
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "billing_interval": {
            "type": "string",
            "enum": [
              "monthly",
              "annual"
            ],
            "title": "Billing Interval"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At"
          },
          "redeemed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redeemed At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "org_id",
          "org_name",
          "owner_email",
          "org_billing_status",
          "status",
          "plan",
          "billing_interval",
          "started_at",
          "redeemed_at"
        ],
        "title": "AdminCouponUse"
      },
      "AdminInternalRequest": {
        "properties": {
          "internal": {
            "type": "boolean",
            "title": "Internal"
          },
          "note": {
            "type": "string",
            "maxLength": 500,
            "title": "Note",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "internal"
        ],
        "title": "AdminInternalRequest"
      },
      "AdminNoteRequest": {
        "properties": {
          "note": {
            "type": "string",
            "maxLength": 500,
            "title": "Note",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "AdminNoteRequest"
      },
      "AdminOrgDetail": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "billing_interval": {
            "type": "string",
            "enum": [
              "monthly",
              "annual"
            ],
            "title": "Billing Interval"
          },
          "billing_status": {
            "type": "string",
            "enum": [
              "unpaid",
              "active",
              "past_due",
              "cancelled",
              "complimentary",
              "demo"
            ],
            "title": "Billing Status"
          },
          "complimentary_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Complimentary Until"
          },
          "suspended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suspended At"
          },
          "suspended_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suspended Reason"
          },
          "payment_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Provider"
          },
          "provider_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Customer Id"
          },
          "provider_subscription_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Subscription Id"
          },
          "current_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Period End"
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "closing_requested_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closing Requested At"
          },
          "is_internal": {
            "type": "boolean",
            "title": "Is Internal"
          },
          "owner_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Email"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "projects": {
            "type": "integer",
            "title": "Projects"
          },
          "documents": {
            "type": "integer",
            "title": "Documents"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          },
          "last_active_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Active At"
          },
          "usage": {
            "$ref": "#/components/schemas/UsageResponse"
          },
          "codes": {
            "items": {
              "$ref": "#/components/schemas/AdminCodeUse"
            },
            "type": "array",
            "title": "Codes"
          },
          "stripe_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Url"
          },
          "activity": {
            "items": {
              "$ref": "#/components/schemas/AdminActivity"
            },
            "type": "array",
            "title": "Activity"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name",
          "plan",
          "billing_interval",
          "billing_status",
          "complimentary_until",
          "suspended_at",
          "suspended_reason",
          "payment_provider",
          "provider_customer_id",
          "provider_subscription_id",
          "current_period_end",
          "cancel_at_period_end",
          "created_at",
          "closing_requested_at",
          "is_internal",
          "owner_email",
          "owner_name",
          "projects",
          "documents",
          "pages",
          "last_active_at",
          "usage",
          "codes",
          "stripe_url",
          "activity"
        ],
        "title": "AdminOrgDetail"
      },
      "AdminOrgList": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "orgs": {
            "items": {
              "$ref": "#/components/schemas/AdminOrgRow"
            },
            "type": "array",
            "title": "Orgs"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "total",
          "orgs"
        ],
        "title": "AdminOrgList"
      },
      "AdminOrgRow": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "owner_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Email"
          },
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "billing_status": {
            "type": "string",
            "enum": [
              "unpaid",
              "active",
              "past_due",
              "cancelled",
              "complimentary",
              "demo"
            ],
            "title": "Billing Status"
          },
          "complimentary_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Complimentary Until"
          },
          "suspended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suspended At"
          },
          "is_internal": {
            "type": "boolean",
            "title": "Is Internal"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_active_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Active At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name",
          "owner_email",
          "plan",
          "billing_status",
          "complimentary_until",
          "suspended_at",
          "is_internal",
          "created_at",
          "last_active_at"
        ],
        "title": "AdminOrgRow"
      },
      "AdminOverview": {
        "properties": {
          "signups_today": {
            "type": "integer",
            "title": "Signups Today"
          },
          "signups_7d": {
            "type": "integer",
            "title": "Signups 7D"
          },
          "signups_30d": {
            "type": "integer",
            "title": "Signups 30D"
          },
          "by_status": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "By Status"
          },
          "paying": {
            "type": "integer",
            "title": "Paying"
          },
          "paying_by_plan": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Paying By Plan"
          },
          "monthly_revenue_usd": {
            "type": "number",
            "title": "Monthly Revenue Usd"
          },
          "complimentary": {
            "type": "integer",
            "title": "Complimentary"
          },
          "suspended": {
            "type": "integer",
            "title": "Suspended"
          },
          "questions_today": {
            "type": "integer",
            "title": "Questions Today"
          },
          "questions_7d": {
            "type": "integer",
            "title": "Questions 7D"
          },
          "demo_starts_today": {
            "type": "integer",
            "title": "Demo Starts Today"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "signups_today",
          "signups_7d",
          "signups_30d",
          "by_status",
          "paying",
          "paying_by_plan",
          "monthly_revenue_usd",
          "complimentary",
          "suspended",
          "questions_today",
          "questions_7d",
          "demo_starts_today"
        ],
        "title": "AdminOverview"
      },
      "AdminPlanRequest": {
        "properties": {
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "note": {
            "type": "string",
            "maxLength": 500,
            "title": "Note",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plan"
        ],
        "title": "AdminPlanRequest"
      },
      "AdminReach": {
        "properties": {
          "days": {
            "type": "integer",
            "title": "Days"
          },
          "since": {
            "type": "string",
            "format": "date-time",
            "title": "Since"
          },
          "until": {
            "type": "string",
            "format": "date-time",
            "title": "Until"
          },
          "funnel": {
            "$ref": "#/components/schemas/ReachFunnel"
          },
          "previous_funnel": {
            "$ref": "#/components/schemas/ReachFunnel"
          },
          "web": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReachWeb"
              },
              {
                "type": "null"
              }
            ]
          },
          "web_previous_views": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Previous Views"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "days",
          "since",
          "until",
          "funnel",
          "previous_funnel",
          "web",
          "web_previous_views"
        ],
        "title": "AdminReach"
      },
      "AdminSuspendRequest": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "AdminSuspendRequest"
      },
      "AnswerRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Query"
          },
          "end_user_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "End User Id",
            "description": "Your own id for the person asking. Scopes private documents and memory."
          },
          "top_k": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 1.0,
            "title": "Top K",
            "default": 8
          },
          "filters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filters"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": false
          },
          "answer_length": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "short",
                  "standard"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Answer Length",
            "description": "short: a few sentences. Defaults to the project's behaviour setting."
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id",
            "description": "Continue this conversation: a follow-up like \"and on Saturdays?\" is understood from its earlier turns. Needs end_user_id. Answers start a new conversation when it's left out and return its id."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "query"
        ],
        "title": "AnswerRequest"
      },
      "AnswerResponse": {
        "properties": {
          "answer": {
            "type": "string",
            "title": "Answer"
          },
          "citations": {
            "items": {
              "$ref": "#/components/schemas/Citation"
            },
            "type": "array",
            "title": "Citations"
          },
          "answered": {
            "type": "boolean",
            "title": "Answered",
            "description": "False when no source supports the answer."
          },
          "source": {
            "type": "string",
            "enum": [
              "generated",
              "pinned",
              "escalation",
              "no_sources"
            ],
            "title": "Source"
          },
          "chunks": {
            "items": {
              "$ref": "#/components/schemas/RetrievedChunk"
            },
            "type": "array",
            "title": "Chunks"
          },
          "used_memories": {
            "items": {
              "$ref": "#/components/schemas/UsedMemory"
            },
            "type": "array",
            "title": "Used Memories"
          },
          "query_log_id": {
            "type": "string",
            "format": "uuid",
            "title": "Query Log Id"
          },
          "latency_ms": {
            "type": "integer",
            "title": "Latency Ms"
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id",
            "description": "Send it with the next question to ask a follow-up. Null without end_user_id."
          },
          "standalone_query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Standalone Query",
            "description": "The follow-up rewritten as a question that stands on its own; null for a conversation's first question."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "answer",
          "citations",
          "answered",
          "source",
          "chunks",
          "used_memories",
          "query_log_id",
          "latency_ms",
          "conversation_id",
          "standalone_query"
        ],
        "title": "AnswerResponse"
      },
      "ApiKey": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "last_used_at",
          "revoked_at",
          "created_at"
        ],
        "title": "ApiKey"
      },
      "ApiKeyCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ApiKeyCreate"
      },
      "ApiKeyCreated": {
        "properties": {
          "api_key": {
            "$ref": "#/components/schemas/ApiKey"
          },
          "secret": {
            "type": "string",
            "title": "Secret",
            "description": "Shown once. Store it now; it cannot be retrieved again."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key",
          "secret"
        ],
        "title": "ApiKeyCreated"
      },
      "Behaviour": {
        "properties": {
          "tone": {
            "type": "string",
            "enum": [
              "friendly",
              "warm",
              "formal",
              "concise"
            ],
            "title": "Tone",
            "default": "friendly"
          },
          "answer_length": {
            "type": "string",
            "enum": [
              "short",
              "standard"
            ],
            "title": "Answer Length",
            "default": "standard"
          },
          "off_limits": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 30,
            "title": "Off Limits"
          },
          "handoff_contact": {
            "type": "string",
            "maxLength": 300,
            "title": "Handoff Contact",
            "default": ""
          },
          "disclaimer": {
            "type": "string",
            "maxLength": 500,
            "title": "Disclaimer",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Behaviour"
      },
      "BillingOptions": {
        "properties": {
          "prices": {
            "items": {
              "$ref": "#/components/schemas/BillingPrice"
            },
            "type": "array",
            "title": "Prices"
          },
          "has_subscription": {
            "type": "boolean",
            "title": "Has Subscription"
          },
          "discount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CurrentDiscount"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "prices",
          "has_subscription"
        ],
        "title": "BillingOptions"
      },
      "BillingPrice": {
        "properties": {
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "interval": {
            "type": "string",
            "enum": [
              "monthly",
              "annual"
            ],
            "title": "Interval"
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD",
              "GBP"
            ],
            "title": "Currency"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          },
          "queries_per_month": {
            "type": "integer",
            "title": "Queries Per Month"
          },
          "projects": {
            "type": "integer",
            "title": "Projects"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plan",
          "interval",
          "currency",
          "amount",
          "pages",
          "queries_per_month",
          "projects"
        ],
        "title": "BillingPrice"
      },
      "Body_create_document_console_projects__project_id__documents_post": {
        "properties": {
          "file": {
            "anyOf": [
              {
                "type": "string",
                "contentMediaType": "application/octet-stream"
              },
              {
                "type": "null"
              }
            ],
            "title": "File"
          },
          "end_user_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "End User Id"
          },
          "metadata": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata",
            "description": "JSON object"
          }
        },
        "type": "object",
        "title": "Body_create_document_console_projects__project_id__documents_post"
      },
      "Body_create_document_v1_documents_post": {
        "properties": {
          "file": {
            "anyOf": [
              {
                "type": "string",
                "contentMediaType": "application/octet-stream"
              },
              {
                "type": "null"
              }
            ],
            "title": "File"
          },
          "end_user_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "End User Id"
          },
          "metadata": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata",
            "description": "JSON object"
          }
        },
        "type": "object",
        "title": "Body_create_document_v1_documents_post"
      },
      "CheckoutRequest": {
        "properties": {
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "interval": {
            "type": "string",
            "enum": [
              "monthly",
              "annual"
            ],
            "title": "Interval",
            "default": "monthly"
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD",
              "GBP"
            ],
            "title": "Currency",
            "default": "USD"
          },
          "coupon_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Coupon Code"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plan"
        ],
        "title": "CheckoutRequest"
      },
      "Citation": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number"
          },
          "chunk_id": {
            "type": "string",
            "format": "uuid",
            "title": "Chunk Id"
          },
          "document_id": {
            "type": "string",
            "format": "uuid",
            "title": "Document Id"
          },
          "document_title": {
            "type": "string",
            "title": "Document Title"
          },
          "page_from": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page From"
          },
          "page_to": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page To"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "number",
          "chunk_id",
          "document_id",
          "document_title",
          "page_from",
          "page_to"
        ],
        "title": "Citation"
      },
      "CloseAccountRequest": {
        "properties": {
          "confirm_name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Confirm Name",
            "description": "The organisation's name, typed to confirm."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "confirm_name"
        ],
        "title": "CloseAccountRequest"
      },
      "ConversationMessage": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "user",
              "assistant"
            ],
            "title": "Role"
          },
          "text": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Text"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "role",
          "text"
        ],
        "title": "ConversationMessage"
      },
      "CouponCheckRequest": {
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Code"
          },
          "interval": {
            "type": "string",
            "enum": [
              "monthly",
              "annual"
            ],
            "title": "Interval",
            "default": "monthly"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code"
        ],
        "title": "CouponCheckRequest"
      },
      "CouponCheckResult": {
        "properties": {
          "valid": {
            "type": "boolean",
            "title": "Valid"
          },
          "outcome": {
            "type": "string",
            "title": "Outcome"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "percent_off": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Percent Off"
          },
          "duration_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Months"
          },
          "plans": {
            "items": {
              "type": "string",
              "enum": [
                "try",
                "build",
                "scale"
              ]
            },
            "type": "array",
            "title": "Plans"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "valid",
          "outcome",
          "message",
          "code"
        ],
        "title": "CouponCheckResult"
      },
      "CouponRedeemRequest": {
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Code"
          },
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "plan"
        ],
        "title": "CouponRedeemRequest"
      },
      "CouponRedeemResult": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "until": {
            "type": "string",
            "format": "date",
            "title": "Until"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "plan",
          "until"
        ],
        "title": "CouponRedeemResult"
      },
      "CurrentDiscount": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "percent_off": {
            "type": "integer",
            "title": "Percent Off"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "title": "Ends At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "percent_off",
          "ends_at"
        ],
        "title": "CurrentDiscount"
      },
      "DataExport": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "building",
              "ready",
              "failed",
              "expired"
            ],
            "title": "Status"
          },
          "bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bytes",
            "description": "Size of the archive once ready."
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At",
            "description": "The download works until then."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "status",
          "bytes",
          "error",
          "expires_at",
          "created_at",
          "updated_at"
        ],
        "title": "DataExport"
      },
      "Document": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "ready",
              "failed"
            ],
            "title": "Status"
          },
          "source_type": {
            "type": "string",
            "enum": [
              "file",
              "url"
            ],
            "title": "Source Type"
          },
          "source_uri": {
            "type": "string",
            "title": "Source Uri"
          },
          "content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Type"
          },
          "bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bytes"
          },
          "pages": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pages"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "end_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End User Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "title",
          "status",
          "source_type",
          "source_uri",
          "content_type",
          "bytes",
          "pages",
          "error",
          "warnings",
          "metadata",
          "end_user_id",
          "created_at",
          "updated_at"
        ],
        "title": "Document"
      },
      "DocumentList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Document"
            },
            "type": "array",
            "title": "Data"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "DocumentList"
      },
      "EndUserSummary": {
        "properties": {
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "title": "Last Seen At"
          },
          "documents": {
            "type": "integer",
            "title": "Documents"
          },
          "memories": {
            "type": "integer",
            "title": "Memories"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "external_id",
          "created_at",
          "last_seen_at",
          "documents",
          "memories"
        ],
        "title": "EndUserSummary"
      },
      "ErasureCounts": {
        "properties": {
          "documents": {
            "type": "integer",
            "title": "Documents"
          },
          "chunks": {
            "type": "integer",
            "title": "Chunks"
          },
          "memories": {
            "type": "integer",
            "title": "Memories"
          },
          "messages": {
            "type": "integer",
            "title": "Messages"
          },
          "query_logs": {
            "type": "integer",
            "title": "Query Logs"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "documents",
          "chunks",
          "memories",
          "messages",
          "query_logs"
        ],
        "title": "ErasureCounts"
      },
      "ErasureResult": {
        "properties": {
          "erased": {
            "type": "boolean",
            "title": "Erased"
          },
          "counts": {
            "$ref": "#/components/schemas/ErasureCounts"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "erased",
          "counts"
        ],
        "title": "ErasureResult"
      },
      "ErrorBody": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "message",
          "request_id"
        ],
        "title": "ErrorBody"
      },
      "ErrorResponse": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ErrorResponse"
      },
      "FeedbackRequest": {
        "properties": {
          "query_log_id": {
            "type": "string",
            "format": "uuid",
            "title": "Query Log Id"
          },
          "rating": {
            "type": "integer",
            "enum": [
              -1,
              1
            ],
            "title": "Rating"
          },
          "correction": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Correction"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "query_log_id",
          "rating"
        ],
        "title": "FeedbackRequest"
      },
      "HistoryDeleted": {
        "properties": {
          "deleted": {
            "type": "integer",
            "title": "Deleted"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "deleted"
        ],
        "title": "HistoryDeleted"
      },
      "InboxGroup": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "question": {
            "type": "string",
            "title": "Question"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "last_asked_at": {
            "type": "string",
            "format": "date-time",
            "title": "Last Asked At"
          },
          "reasons": {
            "items": {
              "type": "string",
              "enum": [
                "unanswered",
                "rated_bad"
              ]
            },
            "type": "array",
            "title": "Reasons"
          },
          "latest_answer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Answer"
          },
          "correction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correction"
          },
          "examples": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Examples"
          },
          "query_log_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Query Log Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "question",
          "count",
          "last_asked_at",
          "reasons",
          "latest_answer",
          "correction",
          "examples",
          "query_log_ids"
        ],
        "title": "InboxGroup"
      },
      "Me": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "member"
            ],
            "title": "Role"
          },
          "org": {
            "$ref": "#/components/schemas/Org"
          },
          "is_admin": {
            "type": "boolean",
            "title": "Is Admin",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "user_id",
          "email",
          "name",
          "avatar_url",
          "role",
          "org"
        ],
        "title": "Me"
      },
      "Memory": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "end_user_id": {
            "type": "string",
            "title": "End User Id"
          },
          "fact": {
            "type": "string",
            "title": "Fact"
          },
          "category": {
            "type": "string",
            "enum": [
              "goal",
              "preference",
              "condition",
              "history",
              "other"
            ],
            "title": "Category"
          },
          "superseded_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Superseded By"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "end_user_id",
          "fact",
          "category",
          "superseded_by",
          "created_at",
          "updated_at"
        ],
        "title": "Memory"
      },
      "MemoryCreate": {
        "properties": {
          "end_user_id": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "End User Id"
          },
          "messages": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ConversationMessage"
                },
                "type": "array",
                "maxItems": 50,
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Messages"
          },
          "fact": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Fact"
          },
          "category": {
            "type": "string",
            "enum": [
              "goal",
              "preference",
              "condition",
              "history",
              "other"
            ],
            "title": "Category",
            "default": "other"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "end_user_id"
        ],
        "title": "MemoryCreate",
        "description": "Either `messages` (facts are extracted in the background) or one `fact`."
      },
      "MemoryExtractionQueued": {
        "properties": {
          "status": {
            "type": "string",
            "const": "queued",
            "title": "Status"
          },
          "message_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Message Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "message_ids"
        ],
        "title": "MemoryExtractionQueued"
      },
      "MemoryList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Memory"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "data"
        ],
        "title": "MemoryList"
      },
      "Onboarding": {
        "properties": {
          "step": {
            "type": "string",
            "enum": [
              "knowledge",
              "test",
              "behaviour",
              "go_live",
              "done"
            ],
            "title": "Step",
            "default": "done"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Onboarding"
      },
      "Org": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "billing_interval": {
            "type": "string",
            "enum": [
              "monthly",
              "annual"
            ],
            "title": "Billing Interval"
          },
          "billing_status": {
            "type": "string",
            "enum": [
              "unpaid",
              "active",
              "past_due",
              "cancelled",
              "complimentary",
              "demo"
            ],
            "title": "Billing Status"
          },
          "current_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Period End"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "is_demo": {
            "type": "boolean",
            "title": "Is Demo"
          },
          "demo_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Demo Expires At"
          },
          "demo_uploads_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Demo Uploads Remaining"
          },
          "complimentary_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Complimentary Until"
          },
          "suspended": {
            "type": "boolean",
            "title": "Suspended",
            "default": false
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End",
            "default": false
          },
          "is_internal": {
            "type": "boolean",
            "title": "Is Internal",
            "default": false
          },
          "history_retention_days": {
            "anyOf": [
              {
                "type": "integer",
                "enum": [
                  7,
                  30,
                  90,
                  365
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "History Retention Days"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name",
          "plan",
          "billing_interval",
          "billing_status",
          "current_period_end",
          "created_at",
          "is_demo",
          "demo_expires_at"
        ],
        "title": "Org"
      },
      "PinnedAnswer": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "question": {
            "type": "string",
            "title": "Question"
          },
          "answer": {
            "type": "string",
            "title": "Answer"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "question",
          "answer",
          "created_by",
          "created_at"
        ],
        "title": "PinnedAnswer"
      },
      "PinnedAnswerCreate": {
        "properties": {
          "question": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Question"
          },
          "answer": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Answer"
          },
          "resolves": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 500,
            "title": "Resolves",
            "description": "Inbox query log ids this answer fixes; they leave the inbox."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "question",
          "answer"
        ],
        "title": "PinnedAnswerCreate"
      },
      "PrivacySettings": {
        "properties": {
          "history_retention_days": {
            "anyOf": [
              {
                "type": "integer",
                "enum": [
                  7,
                  30,
                  90,
                  365
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "History Retention Days"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "history_retention_days"
        ],
        "title": "PrivacySettings"
      },
      "Project": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "template": {
            "type": "string",
            "title": "Template"
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt"
          },
          "behaviour": {
            "additionalProperties": true,
            "type": "object",
            "title": "Behaviour"
          },
          "onboarding": {
            "$ref": "#/components/schemas/Onboarding"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name",
          "template",
          "system_prompt",
          "behaviour",
          "onboarding",
          "created_at"
        ],
        "title": "Project"
      },
      "ProjectCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Name"
          },
          "template": {
            "type": "string",
            "title": "Template",
            "default": "generic"
          },
          "onboarding": {
            "type": "boolean",
            "title": "Onboarding",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ProjectCreate"
      },
      "ProjectUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template"
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8000
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt"
          },
          "behaviour": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Behaviour"
              },
              {
                "type": "null"
              }
            ]
          },
          "onboarding": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Onboarding"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ProjectUpdate"
      },
      "PublicAnswer": {
        "properties": {
          "answer": {
            "type": "string",
            "title": "Answer"
          },
          "citations": {
            "items": {
              "$ref": "#/components/schemas/PublicCitation"
            },
            "type": "array",
            "title": "Citations"
          },
          "answered": {
            "type": "boolean",
            "title": "Answered"
          },
          "query_log_id": {
            "type": "string",
            "format": "uuid",
            "title": "Query Log Id"
          },
          "conversation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Conversation Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "answer",
          "citations",
          "answered",
          "query_log_id",
          "conversation_id"
        ],
        "title": "PublicAnswer"
      },
      "PublicChatRequest": {
        "properties": {
          "public_key": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Public Key"
          },
          "visitor_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{16,64}$",
            "title": "Visitor Id",
            "description": "Random id the widget keeps."
          },
          "query": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Query"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": true
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id",
            "description": "The conversation to continue, from the previous answer."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "public_key",
          "visitor_id",
          "query"
        ],
        "title": "PublicChatRequest"
      },
      "PublicCitation": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number"
          },
          "document_title": {
            "type": "string",
            "title": "Document Title"
          },
          "page_from": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page From"
          },
          "page_to": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page To"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "number",
          "document_title",
          "page_from",
          "page_to"
        ],
        "title": "PublicCitation"
      },
      "PublicFeedbackRequest": {
        "properties": {
          "public_key": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Public Key"
          },
          "visitor_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{16,64}$",
            "title": "Visitor Id",
            "description": "Random id the widget keeps."
          },
          "query_log_id": {
            "type": "string",
            "format": "uuid",
            "title": "Query Log Id"
          },
          "rating": {
            "type": "integer",
            "enum": [
              -1,
              1
            ],
            "title": "Rating"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "public_key",
          "visitor_id",
          "query_log_id",
          "rating"
        ],
        "title": "PublicFeedbackRequest"
      },
      "ReachCampaign": {
        "properties": {
          "source": {
            "type": "string",
            "title": "Source"
          },
          "campaign": {
            "type": "string",
            "title": "Campaign"
          },
          "views": {
            "type": "integer",
            "title": "Views"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "source",
          "campaign",
          "views"
        ],
        "title": "ReachCampaign"
      },
      "ReachFunnel": {
        "properties": {
          "signups": {
            "type": "integer",
            "title": "Signups"
          },
          "first_document": {
            "type": "integer",
            "title": "First Document"
          },
          "first_question": {
            "type": "integer",
            "title": "First Question"
          },
          "paid_started": {
            "type": "integer",
            "title": "Paid Started"
          },
          "website_chat_on": {
            "type": "integer",
            "title": "Website Chat On"
          },
          "demos_started": {
            "type": "integer",
            "title": "Demos Started"
          },
          "demos_signed_up": {
            "type": "integer",
            "title": "Demos Signed Up"
          },
          "customers_total": {
            "type": "integer",
            "title": "Customers Total"
          },
          "customers_asking_questions": {
            "type": "integer",
            "title": "Customers Asking Questions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "signups",
          "first_document",
          "first_question",
          "paid_started",
          "website_chat_on",
          "demos_started",
          "demos_signed_up",
          "customers_total",
          "customers_asking_questions"
        ],
        "title": "ReachFunnel"
      },
      "ReachPage": {
        "properties": {
          "page": {
            "type": "string",
            "title": "Page"
          },
          "views": {
            "type": "integer",
            "title": "Views"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "page",
          "views"
        ],
        "title": "ReachPage"
      },
      "ReachSource": {
        "properties": {
          "source": {
            "type": "string",
            "title": "Source"
          },
          "views": {
            "type": "integer",
            "title": "Views"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "source",
          "views"
        ],
        "title": "ReachSource"
      },
      "ReachWeb": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "page_views": {
            "type": "integer",
            "title": "Page Views",
            "default": 0
          },
          "pages": {
            "items": {
              "$ref": "#/components/schemas/ReachPage"
            },
            "type": "array",
            "title": "Pages"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/ReachSource"
            },
            "type": "array",
            "title": "Sources"
          },
          "campaigns": {
            "items": {
              "$ref": "#/components/schemas/ReachCampaign"
            },
            "type": "array",
            "title": "Campaigns"
          },
          "get_started_clicks": {
            "type": "integer",
            "title": "Get Started Clicks",
            "default": 0
          },
          "try_demo_clicks": {
            "type": "integer",
            "title": "Try Demo Clicks",
            "default": 0
          },
          "explore_beru_clicks": {
            "type": "integer",
            "title": "Explore Beru Clicks",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ReachWeb"
      },
      "RecalledMemory": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "fact": {
            "type": "string",
            "title": "Fact"
          },
          "category": {
            "type": "string",
            "enum": [
              "goal",
              "preference",
              "condition",
              "history",
              "other"
            ],
            "title": "Category"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "score": {
            "type": "number",
            "title": "Score"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "fact",
          "category",
          "created_at",
          "score"
        ],
        "title": "RecalledMemory"
      },
      "RedirectUrl": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "url"
        ],
        "title": "RedirectUrl"
      },
      "ResolveRequest": {
        "properties": {
          "query_log_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 500,
            "minItems": 1,
            "title": "Query Log Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "query_log_ids"
        ],
        "title": "ResolveRequest"
      },
      "RetrieveRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Query"
          },
          "end_user_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "End User Id",
            "description": "Your own id for the person asking. Scopes private documents and memory."
          },
          "top_k": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 1.0,
            "title": "Top K",
            "default": 8
          },
          "filters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filters",
            "description": "Match documents whose metadata contains these key/values."
          },
          "include_memory": {
            "type": "boolean",
            "title": "Include Memory",
            "default": true
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id",
            "description": "Continue this conversation: a follow-up like \"and on Saturdays?\" is understood from its earlier turns. Needs end_user_id. Answers start a new conversation when it's left out and return its id."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "query"
        ],
        "title": "RetrieveRequest"
      },
      "RetrieveResponse": {
        "properties": {
          "chunks": {
            "items": {
              "$ref": "#/components/schemas/RetrievedChunk"
            },
            "type": "array",
            "title": "Chunks"
          },
          "memories": {
            "items": {
              "$ref": "#/components/schemas/RecalledMemory"
            },
            "type": "array",
            "title": "Memories",
            "description": "The end user's most relevant facts; empty without end_user_id."
          },
          "standalone_query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Standalone Query",
            "description": "What was searched for when the query was a follow-up in a conversation."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "chunks",
          "memories"
        ],
        "title": "RetrieveResponse"
      },
      "RetrievedChunk": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "document_id": {
            "type": "string",
            "format": "uuid",
            "title": "Document Id"
          },
          "document_title": {
            "type": "string",
            "title": "Document Title"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "section_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Section Title"
          },
          "page_from": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page From"
          },
          "page_to": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page To"
          },
          "score": {
            "type": "number",
            "title": "Score"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "document_id",
          "document_title",
          "text",
          "section_title",
          "page_from",
          "page_to",
          "score",
          "metadata"
        ],
        "title": "RetrievedChunk"
      },
      "SpendingCapRequest": {
        "properties": {
          "spending_cap_usd": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 100000.0,
                "minimum": 0.0
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spending Cap Usd"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SpendingCapRequest"
      },
      "StarterQuestions": {
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "documents",
              "template"
            ],
            "title": "Source"
          },
          "questions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Questions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "source",
          "questions"
        ],
        "title": "StarterQuestions"
      },
      "TemplateInfo": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "example_question": {
            "type": "string",
            "title": "Example Question"
          },
          "example_answer": {
            "type": "string",
            "title": "Example Answer"
          },
          "starter_questions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Starter Questions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "key",
          "label",
          "description",
          "example_question",
          "example_answer",
          "starter_questions"
        ],
        "title": "TemplateInfo"
      },
      "UsageByProject": {
        "properties": {
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "qty": {
            "type": "integer",
            "title": "Qty"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "project_id",
          "type",
          "qty"
        ],
        "title": "UsageByProject"
      },
      "UsageCounter": {
        "properties": {
          "used": {
            "type": "integer",
            "title": "Used"
          },
          "included": {
            "type": "integer",
            "title": "Included"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "used",
          "included"
        ],
        "title": "UsageCounter"
      },
      "UsageResponse": {
        "properties": {
          "plan": {
            "type": "string",
            "enum": [
              "try",
              "build",
              "scale"
            ],
            "title": "Plan"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End"
          },
          "overage_billing": {
            "type": "boolean",
            "title": "Overage Billing"
          },
          "pages": {
            "$ref": "#/components/schemas/UsageCounter"
          },
          "queries": {
            "$ref": "#/components/schemas/UsageCounter"
          },
          "overage_usd": {
            "type": "string",
            "title": "Overage Usd"
          },
          "spending_cap_usd": {
            "type": "string",
            "title": "Spending Cap Usd"
          },
          "by_project": {
            "items": {
              "$ref": "#/components/schemas/UsageByProject"
            },
            "type": "array",
            "title": "By Project"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plan",
          "period_start",
          "period_end",
          "overage_billing",
          "pages",
          "queries",
          "overage_usd",
          "spending_cap_usd",
          "by_project"
        ],
        "title": "UsageResponse"
      },
      "UsedMemory": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "fact": {
            "type": "string",
            "title": "Fact"
          },
          "category": {
            "type": "string",
            "enum": [
              "goal",
              "preference",
              "condition",
              "history",
              "other"
            ],
            "title": "Category"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "score": {
            "type": "number",
            "title": "Score"
          },
          "cited": {
            "type": "boolean",
            "title": "Cited",
            "description": "Whether the answer cited this fact as [Mn]."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "fact",
          "category",
          "created_at",
          "score",
          "cited"
        ],
        "title": "UsedMemory"
      },
      "WebChannel": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "public_key": {
            "type": "string",
            "title": "Public Key"
          },
          "allowed_origins": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Allowed Origins"
          },
          "settings": {
            "$ref": "#/components/schemas/WebChannelSettings"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "hosted_url": {
            "type": "string",
            "title": "Hosted Url"
          },
          "snippet": {
            "type": "string",
            "title": "Snippet"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "public_key",
          "allowed_origins",
          "settings",
          "enabled",
          "hosted_url",
          "snippet",
          "created_at"
        ],
        "title": "WebChannel"
      },
      "WebChannelSettings": {
        "properties": {
          "assistant_name": {
            "type": "string",
            "maxLength": 40,
            "minLength": 1,
            "title": "Assistant Name",
            "default": "Assistant"
          },
          "greeting": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Greeting",
            "default": "Hi! How can I help?"
          },
          "show_sources": {
            "type": "boolean",
            "title": "Show Sources",
            "default": false
          },
          "answer_length": {
            "type": "string",
            "enum": [
              "short",
              "standard"
            ],
            "title": "Answer Length",
            "default": "short"
          },
          "remember_visitors": {
            "type": "boolean",
            "title": "Remember Visitors",
            "default": true
          },
          "hide_badge": {
            "type": "boolean",
            "title": "Hide Badge",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "WebChannelSettings"
      },
      "WebChannelState": {
        "properties": {
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebChannel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "channel"
        ],
        "title": "WebChannelState"
      },
      "WebChannelUpdate": {
        "properties": {
          "allowed_origins": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Allowed Origins"
          },
          "settings": {
            "$ref": "#/components/schemas/WebChannelSettings"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "WebChannelUpdate"
      },
      "WebhookDelivery": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "The event id the receiver sees; the same on retries and resends."
          },
          "endpoint_id": {
            "type": "string",
            "format": "uuid",
            "title": "Endpoint Id"
          },
          "event_type": {
            "type": "string",
            "title": "Event Type"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "delivered",
              "failed"
            ],
            "title": "Status"
          },
          "attempts": {
            "type": "integer",
            "title": "Attempts"
          },
          "response_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Attempt At"
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "endpoint_id",
          "event_type",
          "status",
          "attempts",
          "response_status",
          "error",
          "next_attempt_at",
          "delivered_at",
          "created_at"
        ],
        "title": "WebhookDelivery"
      },
      "WebhookEndpoint": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "events": {
            "items": {
              "type": "string",
              "enum": [
                "document.ready",
                "document.failed",
                "usage.threshold",
                "memory.extracted"
              ]
            },
            "type": "array",
            "title": "Events"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "url",
          "events",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "title": "WebhookEndpoint"
      },
      "WebhookEndpointCreate": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 8,
            "pattern": "^https://",
            "title": "Url",
            "description": "https only."
          },
          "events": {
            "items": {
              "type": "string",
              "enum": [
                "document.ready",
                "document.failed",
                "usage.threshold",
                "memory.extracted"
              ]
            },
            "type": "array",
            "maxItems": 4,
            "minItems": 1,
            "title": "Events"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookEndpointCreate"
      },
      "WebhookEndpointUpdate": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "minLength": 8,
                "pattern": "^https://"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "document.ready",
                    "document.failed",
                    "usage.threshold",
                    "memory.extracted"
                  ]
                },
                "type": "array",
                "maxItems": 4,
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "WebhookEndpointUpdate"
      },
      "WebhookEndpointWithSecret": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "events": {
            "items": {
              "type": "string",
              "enum": [
                "document.ready",
                "document.failed",
                "usage.threshold",
                "memory.extracted"
              ]
            },
            "type": "array",
            "title": "Events"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "secret": {
            "type": "string",
            "title": "Secret",
            "description": "Signs every delivery (Beru-Signature). Keep it server-side."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "url",
          "events",
          "enabled",
          "created_at",
          "updated_at",
          "secret"
        ],
        "title": "WebhookEndpointWithSecret"
      },
      "WidgetConfig": {
        "properties": {
          "assistant_name": {
            "type": "string",
            "title": "Assistant Name"
          },
          "greeting": {
            "type": "string",
            "title": "Greeting"
          },
          "show_sources": {
            "type": "boolean",
            "title": "Show Sources"
          },
          "show_badge": {
            "type": "boolean",
            "title": "Show Badge"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "assistant_name",
          "greeting",
          "show_sources",
          "show_badge"
        ],
        "title": "WidgetConfig"
      }
    }
  }
}
