{
  "openapi": "3.1.0",
  "info": {
    "title": "SiteGPT Agent API",
    "version": "2.0.0",
    "description": "Agent-facing API for managing SiteGPT chatbots, dashboard summaries, appearance media, knowledge, settings, conversations, leads, members, account profiles, usage, billing reads, and API tokens."
  },
  "servers": [
    {
      "url": "https://sitegpt.ai"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Discovery"
    },
    {
      "name": "Onboarding"
    },
    {
      "name": "Account"
    },
    {
      "name": "Billing"
    },
    {
      "name": "Tokens"
    },
    {
      "name": "Chatbots"
    },
    {
      "name": "Knowledge"
    },
    {
      "name": "Knowledge Sync Jobs"
    },
    {
      "name": "Knowledge Sources"
    },
    {
      "name": "Custom Responses"
    },
    {
      "name": "Personas"
    },
    {
      "name": "Instructions"
    },
    {
      "name": "Settings"
    },
    {
      "name": "Conversation Starters"
    },
    {
      "name": "Conversation Followups"
    },
    {
      "name": "Members"
    },
    {
      "name": "Leads"
    },
    {
      "name": "Conversations"
    },
    {
      "name": "Messages"
    },
    {
      "name": "Tags"
    }
  ],
  "paths": {
    "/api/v2/openapi.json": {
      "get": {
        "operationId": "getOpenApiSpec",
        "summary": "Get OpenAPI spec",
        "description": "Get the SiteGPT agent API OpenAPI document.\n\nNo authentication is required.",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "x-sitegpt-auth": "none",
        "x-sitegpt-scopes": [],
        "x-mint": {
          "title": "Get OpenAPI spec",
          "description": "Get the SiteGPT agent API OpenAPI document."
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "discovery": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "discovery": {
                      "id": "discovery-id",
                      "name": "Example discovery",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/.well-known/sitegpt-agent.json": {
      "get": {
        "operationId": "getAgentManifest",
        "summary": "Get agent manifest",
        "description": "Get the SiteGPT agent manifest.\n\nNo authentication is required.",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "x-sitegpt-auth": "none",
        "x-sitegpt-scopes": [],
        "x-mint": {
          "title": "Get agent manifest",
          "description": "Get the SiteGPT agent manifest."
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "discovery": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "discovery": {
                      "id": "discovery-id",
                      "name": "Example discovery",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/onboarding/agent/start": {
      "post": {
        "operationId": "startOnboardingWorkspace",
        "summary": "Start onboarding",
        "description": "Start an agent-first onboarding workspace for a public website.\n\nNo authentication is required.",
        "tags": [
          "Onboarding"
        ],
        "security": [],
        "x-sitegpt-auth": "none",
        "x-sitegpt-scopes": [],
        "x-mint": {
          "title": "Start onboarding",
          "description": "Start an agent-first onboarding workspace for a public website."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "websiteUrl"
                ],
                "additionalProperties": false,
                "properties": {
                  "websiteUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public website URL to prepare a temporary chatbot for."
                  },
                  "agentName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Optional display name of the AI agent starting setup."
                  },
                  "agentClientId": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Optional stable client identifier for the agent runtime."
                  }
                }
              },
              "example": {
                "websiteUrl": "https://example.com",
                "agentName": "Claude",
                "agentClientId": "claude-web"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "workspace": {
                          "$ref": "#/components/schemas/GenericObject"
                        },
                        "apiToken": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Temporary one-chatbot token returned once for the setup agent."
                        },
                        "apiBase": {
                          "type": "string",
                          "format": "uri"
                        },
                        "mcpUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "onboardingUrl": {
                          "type": "string",
                          "format": "uri",
                          "description": "Single user-facing URL where the user can test and claim the chatbot."
                        },
                        "statusUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "claimUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "workspace": {
                      "id": "workspace-id",
                      "chatbotId": "chatbot-id",
                      "sourceUrl": "https://example.com/",
                      "normalizedDomain": "example.com",
                      "status": "CREATED",
                      "expiresAt": "2026-05-20T00:00:00.000Z"
                    },
                    "apiToken": "sgpt_xxxxxxxxx",
                    "apiBase": "https://sitegpt.ai",
                    "mcpUrl": "https://sitegpt.ai/mcp",
                    "onboardingUrl": "https://sitegpt.ai/onboarding/preview/workspace-id",
                    "statusUrl": "https://sitegpt.ai/api/v2/onboarding/workspaces/workspace-id",
                    "claimUrl": "https://sitegpt.ai/api/v2/onboarding/workspaces/workspace-id/claim",
                    "expiresAt": "2026-05-20T00:00:00.000Z"
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/onboarding/workspaces/{workspaceId}": {
      "get": {
        "operationId": "getOnboardingWorkspace",
        "summary": "Get onboarding status",
        "description": "Get the onboarding workspace status using the temporary onboarding token.\n\nRequired scope: `account:read`.",
        "tags": [
          "Onboarding"
        ],
        "security": [
          {
            "bearerAuth": [
              "account:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "account:read"
        ],
        "x-mint": {
          "title": "Get onboarding status",
          "description": "Get the onboarding workspace status using the temporary onboarding token."
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "workspace": {
                          "$ref": "#/components/schemas/GenericObject"
                        },
                        "setupChecklist": {
                          "type": "array",
                          "description": "Readiness checklist the agent should inspect before sharing the onboarding URL.",
                          "items": {
                            "type": "object",
                            "required": [
                              "key",
                              "label",
                              "state",
                              "detail"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "key": {
                                "type": "string",
                                "enum": [
                                  "brand_styling",
                                  "conversation_starters",
                                  "followup_prompts",
                                  "instructions",
                                  "knowledge",
                                  "persona"
                                ]
                              },
                              "label": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "DONE",
                                  "PENDING",
                                  "UNKNOWN",
                                  "WARNING"
                                ]
                              },
                              "detail": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "claimUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "onboardingUrl": {
                          "type": "string",
                          "format": "uri",
                          "description": "Single user-facing URL where the user can test and claim the chatbot."
                        },
                        "statusUrl": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "workspace": {
                      "id": "workspace-id",
                      "chatbotId": "chatbot-id",
                      "sourceUrl": "https://example.com/",
                      "normalizedDomain": "example.com",
                      "status": "CREATED",
                      "expiresAt": "2026-05-20T00:00:00.000Z",
                      "claim": {
                        "status": "NOT_STARTED",
                        "email": null,
                        "plan": null,
                        "interval": null,
                        "checkoutUrl": null
                      }
                    },
                    "setupChecklist": [
                      {
                        "key": "knowledge",
                        "label": "Knowledge",
                        "state": "DONE",
                        "detail": "24/24 trained from Sitemap."
                      },
                      {
                        "key": "persona",
                        "label": "Persona",
                        "state": "DONE",
                        "detail": "Custom persona active: Product expert."
                      }
                    ],
                    "claimUrl": "https://sitegpt.ai/api/v2/onboarding/workspaces/workspace-id/claim",
                    "onboardingUrl": "https://sitegpt.ai/onboarding/preview/workspace-id",
                    "statusUrl": "https://sitegpt.ai/api/v2/onboarding/workspaces/workspace-id"
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteOnboardingWorkspace",
        "summary": "Delete onboarding",
        "description": "Delete an unclaimed onboarding workspace and its temporary chatbot.\n\nRequired scope: `account:read`.",
        "tags": [
          "Onboarding"
        ],
        "security": [
          {
            "bearerAuth": [
              "account:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "account:read"
        ],
        "x-mint": {
          "title": "Delete onboarding",
          "description": "Delete an unclaimed onboarding workspace and its temporary chatbot."
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedWorkspace": {
                          "$ref": "#/components/schemas/GenericObject"
                        },
                        "message": {
                          "type": "string",
                          "description": "Confirms the onboarding workspace and temporary chatbot were deleted."
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedWorkspace": {
                      "id": "workspace-id",
                      "chatbotId": "chatbot-id",
                      "sourceUrl": "https://example.com/",
                      "normalizedDomain": "example.com",
                      "status": "REVOKED",
                      "expiresAt": "2026-05-20T00:00:00.000Z"
                    },
                    "message": "The onboarding workspace and temporary chatbot were deleted. This workspace is no longer available."
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/onboarding/workspaces/{workspaceId}/claim": {
      "post": {
        "operationId": "claimOnboardingWorkspace",
        "summary": "Claim onboarding",
        "description": "Create checkout for an onboarding workspace claim.\n\nRequired scope: `account:read`.",
        "tags": [
          "Onboarding"
        ],
        "security": [
          {
            "bearerAuth": [
              "account:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "account:read"
        ],
        "x-mint": {
          "title": "Claim onboarding",
          "description": "Create checkout for an onboarding workspace claim."
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "plan",
                  "interval"
                ],
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254,
                    "description": "Customer email that should own the chatbot after checkout starts the trial."
                  },
                  "plan": {
                    "type": "string",
                    "enum": [
                      "STARTER",
                      "GROWTH",
                      "SCALE"
                    ],
                    "description": "SiteGPT plan selected by the user."
                  },
                  "interval": {
                    "type": "string",
                    "enum": [
                      "MONTH",
                      "YEAR"
                    ],
                    "description": "Billing interval selected by the user."
                  }
                }
              },
              "example": {
                "email": "user@example.com",
                "plan": "GROWTH",
                "interval": "MONTH"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "workspace": {
                          "$ref": "#/components/schemas/GenericObject"
                        },
                        "checkoutUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "SiteGPT checkout URL the user should open to start the trial. Null when the email already belongs to the signed-in active subscriber and the chatbot was claimed directly."
                        },
                        "paddleTransactionId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "onboardingUrl": {
                          "type": "string",
                          "format": "uri",
                          "description": "Single user-facing URL where the user can test and claim the chatbot."
                        },
                        "statusUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "claimUrl": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "workspace": {
                      "id": "workspace-id",
                      "chatbotId": "chatbot-id",
                      "sourceUrl": "https://example.com/",
                      "normalizedDomain": "example.com",
                      "status": "CREATED",
                      "expiresAt": "2026-05-20T00:00:00.000Z",
                      "claim": {
                        "status": "CHECKOUT_PENDING",
                        "email": "user@example.com",
                        "plan": "GROWTH",
                        "interval": "MONTH",
                        "checkoutUrl": "https://sitegpt.ai/pricing?_ptxn=txn_xxxxxxxxx"
                      }
                    },
                    "checkoutUrl": "https://sitegpt.ai/pricing?_ptxn=txn_xxxxxxxxx",
                    "paddleTransactionId": "txn_xxxxxxxxx",
                    "onboardingUrl": "https://sitegpt.ai/onboarding/preview/workspace-id",
                    "statusUrl": "https://sitegpt.ai/api/v2/onboarding/workspaces/workspace-id",
                    "claimUrl": "https://sitegpt.ai/api/v2/onboarding/workspaces/workspace-id/claim"
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/me": {
      "get": {
        "operationId": "getMe",
        "summary": "Get current user",
        "description": "Get the authenticated user and credential context.\n\nRequires a valid SiteGPT bearer token.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [],
        "x-mint": {
          "title": "Get current user",
          "description": "Get the authenticated user and credential context."
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "user": {
                          "$ref": "#/components/schemas/GenericObject"
                        },
                        "auth": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "user": {
                      "id": "user-id",
                      "email": "user@example.com",
                      "name": "SiteGPT User"
                    },
                    "auth": {
                      "type": "api-token",
                      "scopes": []
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/account": {
      "get": {
        "operationId": "getAccount",
        "summary": "Get account",
        "description": "Get current account user and auth metadata.\n\nRequired scope: `account:read`.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": [
              "account:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "account:read"
        ],
        "x-mint": {
          "title": "Get account",
          "description": "Get current account user and auth metadata."
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "user": {
                          "$ref": "#/components/schemas/GenericObject"
                        },
                        "auth": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "user": {
                      "id": "user-id",
                      "email": "user@example.com",
                      "name": "SiteGPT User"
                    },
                    "auth": {
                      "type": "api-token",
                      "scopes": [
                        "account:read"
                      ]
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/account/profile": {
      "patch": {
        "operationId": "updateAccountProfile",
        "summary": "Update profile",
        "description": "Update the authenticated user profile name.\n\nRequired scope: `account:write`.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": [
              "account:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "account:write"
        ],
        "x-mint": {
          "title": "Update profile",
          "description": "Update the authenticated user profile name."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "account": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "account": {
                      "id": "account-id",
                      "name": "Example account",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/account/profile-picture": {
      "post": {
        "operationId": "uploadAccountProfilePicture",
        "summary": "Upload profile picture",
        "description": "Upload the authenticated user profile picture.\n\nRequired scope: `account:write`.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": [
              "account:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "account:write"
        ],
        "x-mint": {
          "title": "Upload profile picture",
          "description": "Upload the authenticated user profile picture."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "imageBase64"
                ],
                "additionalProperties": false,
                "properties": {
                  "imageBase64": {
                    "type": "string",
                    "description": "Base64 image content. Data URLs are accepted."
                  },
                  "fileName": {
                    "type": "string"
                  },
                  "mimeType": {
                    "type": "string",
                    "description": "Image MIME type, for example image/png."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "account": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "account": {
                      "id": "account-id",
                      "name": "Example account",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteAccountProfilePicture",
        "summary": "Delete profile picture",
        "description": "Delete the authenticated user profile picture. Requires confirm=true.\n\nRequired scope: `account:write`.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": [
              "account:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "account:write"
        ],
        "x-mint": {
          "title": "Delete profile picture",
          "description": "Delete the authenticated user profile picture. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedAccount": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedAccount": {
                      "id": "account-id",
                      "name": "Example account",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "Get Usage",
        "description": "Get account usage.\n\nRequired scope: `account:read`.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": [
              "account:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "account:read"
        ],
        "x-mint": {
          "title": "Get Usage",
          "description": "Get account usage."
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "usage": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "account": {
                      "id": "account-id",
                      "name": "Example account",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/limits": {
      "get": {
        "operationId": "getLimits",
        "summary": "Get Limits",
        "description": "Get account limits and remaining quotas.\n\nRequired scope: `account:read`.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": [
              "account:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "account:read"
        ],
        "x-mint": {
          "title": "Get Limits",
          "description": "Get account limits and remaining quotas."
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "limits": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "account": {
                      "id": "account-id",
                      "name": "Example account",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/billing/subscription": {
      "get": {
        "operationId": "getBillingSubscription",
        "summary": "Get subscription",
        "description": "Get billing subscription state.\n\nRequired scope: `billing:read`.",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "bearerAuth": [
              "billing:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "billing:read"
        ],
        "x-mint": {
          "title": "Get subscription",
          "description": "Get billing subscription state."
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "billing": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "billing": {
                      "id": "billing-id",
                      "name": "Example billing",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/billing/invoices": {
      "get": {
        "operationId": "listBillingInvoices",
        "summary": "List invoices",
        "description": "List billing invoices and transaction download links.\n\nRequired scope: `billing:read`.",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "bearerAuth": [
              "billing:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "billing:read"
        ],
        "x-mint": {
          "title": "List invoices",
          "description": "List billing invoices and transaction download links."
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "billings": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "billings": [
                      {
                        "id": "billing-id",
                        "name": "Example billing",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/tokens": {
      "get": {
        "operationId": "listTokens",
        "summary": "List tokens",
        "description": "List API tokens for the authenticated user.\n\nRequired scope: `tokens:read`.\n\nDashboard sessions can call this route, and API tokens must include the listed scope.",
        "tags": [
          "Tokens"
        ],
        "security": [
          {
            "bearerAuth": [
              "tokens:read"
            ]
          }
        ],
        "x-sitegpt-auth": "dashboard-or-bearer",
        "x-sitegpt-scopes": [
          "tokens:read"
        ],
        "x-mint": {
          "title": "List tokens",
          "description": "List API tokens for the authenticated user."
        },
        "parameters": [
          {
            "name": "includeRevoked",
            "in": "query",
            "required": false,
            "description": "Include revoked tokens. Revoked tokens are hidden by default.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "tokens": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "tokens": [
                      {
                        "id": "token-id",
                        "name": "Example token",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createToken",
        "summary": "Create token",
        "description": "Create a scoped API token.\n\nRequired scope: `tokens:write`.\n\nDashboard sessions can call this route, and API tokens must include the listed scope.",
        "tags": [
          "Tokens"
        ],
        "security": [
          {
            "bearerAuth": [
              "tokens:write"
            ]
          }
        ],
        "x-sitegpt-auth": "dashboard-or-bearer",
        "x-sitegpt-scopes": [
          "tokens:write"
        ],
        "x-mint": {
          "title": "Create token",
          "description": "Create a scoped API token."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "scopes"
                ],
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "scopes": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "enum": [
                        "account:read",
                        "account:write",
                        "tokens:read",
                        "tokens:write",
                        "chatbots:read",
                        "chatbots:write",
                        "chatbots:delete",
                        "knowledge:read",
                        "knowledge:write",
                        "knowledge:delete",
                        "personas:read",
                        "personas:write",
                        "personas:delete",
                        "instructions:read",
                        "instructions:write",
                        "instructions:delete",
                        "settings:read",
                        "settings:write",
                        "starters:read",
                        "starters:write",
                        "starters:delete",
                        "followups:read",
                        "followups:write",
                        "followups:delete",
                        "conversations:read",
                        "conversations:write",
                        "conversations:delete",
                        "leads:read",
                        "leads:write",
                        "leads:delete",
                        "members:read",
                        "members:write",
                        "members:delete",
                        "integrations:read",
                        "integrations:write",
                        "billing:read",
                        "billing:write"
                      ]
                    }
                  },
                  "chatbotIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional chatbot IDs to restrict this token to. Omit for all accessible chatbots."
                  },
                  "expiresInDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365,
                    "default": 90
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Absolute token expiration. Cannot be combined with expiresInDays."
                  }
                }
              },
              "example": {
                "name": "Knowledge updater",
                "scopes": [
                  "account:read",
                  "chatbots:read",
                  "knowledge:read",
                  "knowledge:write"
                ],
                "expiresInDays": 90
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "token": {
                          "$ref": "#/components/schemas/GenericObject"
                        },
                        "plaintextToken": {
                          "type": "string",
                          "description": "Plaintext token returned once. Store it immediately."
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "token": {
                      "id": "token-id",
                      "name": "Knowledge updater",
                      "scopes": [
                        "account:read",
                        "chatbots:read",
                        "knowledge:write"
                      ]
                    },
                    "plaintextToken": "sgpt_xxxxxxxxx"
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/tokens/{tokenId}": {
      "delete": {
        "operationId": "revokeToken",
        "summary": "Revoke token",
        "description": "Revoke an API token.\n\nRequired scope: `tokens:write`.\n\nDashboard sessions can call this route, and API tokens must include the listed scope.",
        "tags": [
          "Tokens"
        ],
        "security": [
          {
            "bearerAuth": [
              "tokens:write"
            ]
          }
        ],
        "x-sitegpt-auth": "dashboard-or-bearer",
        "x-sitegpt-scopes": [
          "tokens:write"
        ],
        "x-mint": {
          "title": "Revoke token",
          "description": "Revoke an API token."
        },
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "token": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "token": {
                      "id": "token-id",
                      "name": "Example token",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/tokens/{tokenId}/rotate": {
      "post": {
        "operationId": "rotateToken",
        "summary": "Rotate token",
        "description": "Rotate an active API token and return the new plaintext token once.\n\nRequired scope: `tokens:write`.\n\nDashboard sessions can call this route, and API tokens must include the listed scope.",
        "tags": [
          "Tokens"
        ],
        "security": [
          {
            "bearerAuth": [
              "tokens:write"
            ]
          }
        ],
        "x-sitegpt-auth": "dashboard-or-bearer",
        "x-sitegpt-scopes": [
          "tokens:write"
        ],
        "x-mint": {
          "title": "Rotate token",
          "description": "Rotate an active API token and return the new plaintext token once."
        },
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "token": {
                          "$ref": "#/components/schemas/GenericObject"
                        },
                        "plaintextToken": {
                          "type": "string",
                          "description": "Plaintext token returned once. Store it immediately."
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "token": {
                      "id": "token-id",
                      "name": "Knowledge updater",
                      "scopes": [
                        "account:read",
                        "chatbots:read",
                        "knowledge:write"
                      ]
                    },
                    "plaintextToken": "sgpt_xxxxxxxxx"
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots": {
      "get": {
        "operationId": "listChatbots",
        "summary": "List chatbots",
        "description": "List chatbots accessible to the authenticated user.\n\nRequired scope: `chatbots:read`.",
        "tags": [
          "Chatbots"
        ],
        "security": [
          {
            "bearerAuth": [
              "chatbots:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "chatbots:read"
        ],
        "x-mint": {
          "title": "List chatbots",
          "description": "List chatbots accessible to the authenticated user."
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "chatbots": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "chatbots": [
                      {
                        "id": "chatbot-id",
                        "name": "Example chatbot",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createChatbot",
        "summary": "Create chatbot",
        "description": "Create a chatbot.\n\nRequired scope: `chatbots:write`.",
        "tags": [
          "Chatbots"
        ],
        "security": [
          {
            "bearerAuth": [
              "chatbots:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "chatbots:write"
        ],
        "x-mint": {
          "title": "Create chatbot",
          "description": "Create a chatbot."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              },
              "example": {
                "title": "Acme Support",
                "description": "Answers customer support questions for Acme."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "chatbot": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "chatbot": {
                      "id": "chatbot-id",
                      "name": "Example chatbot",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}": {
      "get": {
        "operationId": "getChatbot",
        "summary": "Get chatbot",
        "description": "Get one chatbot.\n\nRequired scope: `chatbots:read`.",
        "tags": [
          "Chatbots"
        ],
        "security": [
          {
            "bearerAuth": [
              "chatbots:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "chatbots:read"
        ],
        "x-mint": {
          "title": "Get chatbot",
          "description": "Get one chatbot."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "chatbot": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "chatbot": {
                      "id": "chatbot-id",
                      "name": "Example chatbot",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateChatbot",
        "summary": "Update chatbot",
        "description": "Update chatbot title or description.\n\nRequired scope: `chatbots:write`.",
        "tags": [
          "Chatbots"
        ],
        "security": [
          {
            "bearerAuth": [
              "chatbots:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "chatbots:write"
        ],
        "x-mint": {
          "title": "Update chatbot",
          "description": "Update chatbot title or description."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              },
              "example": {
                "title": "Acme Help Center"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "chatbot": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "chatbot": {
                      "id": "chatbot-id",
                      "name": "Example chatbot",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteChatbot",
        "summary": "Delete chatbot",
        "description": "Delete a chatbot. Requires confirm=true.\n\nRequired scope: `chatbots:delete`.",
        "tags": [
          "Chatbots"
        ],
        "security": [
          {
            "bearerAuth": [
              "chatbots:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "chatbots:delete"
        ],
        "x-mint": {
          "title": "Delete chatbot",
          "description": "Delete a chatbot. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedChatbot": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedChatbot": {
                      "id": "chatbot-id",
                      "name": "Example chatbot",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/dashboard": {
      "get": {
        "operationId": "getChatbotDashboard",
        "summary": "Get dashboard summary",
        "description": "Get chatbot dashboard summary, knowledge counts, conversation feedback, and install metadata.\n\nRequired scope: `chatbots:read`.",
        "tags": [
          "Chatbots"
        ],
        "security": [
          {
            "bearerAuth": [
              "chatbots:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "chatbots:read"
        ],
        "x-mint": {
          "title": "Get dashboard summary",
          "description": "Get chatbot dashboard summary, knowledge counts, conversation feedback, and install metadata."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "chatbot": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "chatbot": {
                      "id": "chatbot-id",
                      "name": "Example chatbot",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/icons": {
      "post": {
        "operationId": "uploadChatbotIcon",
        "summary": "Upload icon",
        "description": "Upload a chatbot appearance icon. Supported types: bot, person, agent, watermark, and chat-bubble.\n\nRequired scope: `settings:write`.",
        "tags": [
          "Chatbots"
        ],
        "security": [
          {
            "bearerAuth": [
              "settings:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "settings:write"
        ],
        "x-mint": {
          "title": "Upload icon",
          "description": "Upload a chatbot appearance icon. Supported types: bot, person, agent, watermark, and chat-bubble."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "iconType",
                  "imageBase64"
                ],
                "additionalProperties": false,
                "properties": {
                  "iconType": {
                    "type": "string",
                    "enum": [
                      "bot",
                      "person",
                      "agent",
                      "watermark",
                      "chat-bubble"
                    ]
                  },
                  "imageBase64": {
                    "type": "string",
                    "description": "Base64 image content. Data URLs are accepted."
                  },
                  "fileName": {
                    "type": "string"
                  },
                  "mimeType": {
                    "type": "string",
                    "description": "Image MIME type, for example image/png."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "chatbot": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "chatbot": {
                      "id": "chatbot-id",
                      "name": "Example chatbot",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/icons/{iconType}": {
      "delete": {
        "operationId": "deleteChatbotIcon",
        "summary": "Delete icon",
        "description": "Delete a chatbot appearance icon. Requires confirm=true.\n\nRequired scope: `settings:write`.",
        "tags": [
          "Chatbots"
        ],
        "security": [
          {
            "bearerAuth": [
              "settings:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "settings:write"
        ],
        "x-mint": {
          "title": "Delete icon",
          "description": "Delete a chatbot appearance icon. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "iconType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "bot",
                "person",
                "agent",
                "watermark",
                "chat-bubble"
              ]
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedChatbot": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedChatbot": {
                      "id": "chatbot-id",
                      "name": "Example chatbot",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/transfer": {
      "post": {
        "operationId": "transferChatbot",
        "summary": "Transfer Chatbot",
        "description": "Transfer a chatbot to another user in the same brand (reassign ownership). Provide email or userId. If the recipient has no account in the brand yet, one is created. By default the previous owner is removed from the chatbot; pass keepSourceAs to keep them as a member at that role. Requires the chatbot_transfer permission, held by SUPER_ADMIN members (the chatbot creator is always a SUPER_ADMIN).\n\nRequired scope: `chatbots:write`, `members:write`, `members:delete`.",
        "tags": [
          "Chatbots"
        ],
        "security": [
          {
            "bearerAuth": [
              "chatbots:write",
              "members:write",
              "members:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "chatbots:write",
          "members:write",
          "members:delete"
        ],
        "x-mint": {
          "title": "Transfer Chatbot",
          "description": "Transfer a chatbot to another user in the same brand (reassign ownership). Provide email or userId. If the recipient has no account in the brand yet, one is created. By default the previous owner is removed from the chatbot; pass keepSourceAs to keep them as a member at that role. Requires the chatbot_transfer permission, held by SUPER_ADMIN members (the chatbot creator is always a SUPER_ADMIN)."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "email"
                    ]
                  },
                  {
                    "required": [
                      "userId"
                    ]
                  }
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Email of the user to transfer ownership to. If no user with this email exists in the brand yet, an account is provisioned for them."
                  },
                  "userId": {
                    "type": "string",
                    "description": "User id of the recipient. Use instead of email, or to disambiguate. Must be a user in the same brand."
                  },
                  "keepSourceAs": {
                    "type": "string",
                    "enum": [
                      "AGENT",
                      "MANAGER",
                      "ADMIN",
                      "SUPER_ADMIN"
                    ],
                    "description": "If set, keep the previous owner as a member at this role (ownership reassignment within a team). If omitted, the previous owner is removed from the chatbot (full transfer)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "chatbot": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "chatbot": {
                      "id": "chatbot-id",
                      "name": "Example chatbot",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/documents": {
      "get": {
        "operationId": "listKnowledgeDocuments",
        "summary": "List documents",
        "description": "List chatbot knowledge documents, including raw and parsed content URLs when available.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "List documents",
          "description": "List chatbot knowledge documents, including raw and parsed content URLs when available."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of records to return.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search query.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Repeatable source filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Repeatable status filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Repeatable document type filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "documents": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "documents": [
                      {
                        "id": "document-id",
                        "name": "Example document",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/documents/{documentId}": {
      "get": {
        "operationId": "getKnowledgeDocument",
        "summary": "Get document",
        "description": "Get full details for one knowledge document, with optional inlined text content.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "Get document",
          "description": "Get full details for one knowledge document, with optional inlined text content."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeContent",
            "in": "query",
            "required": false,
            "description": "Inline text content when available.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "maxContentChars",
            "in": "query",
            "required": false,
            "description": "Maximum characters to inline per content field.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateKnowledgeDocument",
        "summary": "Update document",
        "description": "Update editable content for one knowledge document.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Update document",
          "description": "Update editable content for one knowledge document."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "content"
                ],
                "additionalProperties": false,
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Replacement text content for an editable knowledge document."
                  }
                }
              },
              "example": {
                "content": "Updated knowledge content."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteKnowledgeDocument",
        "summary": "Delete document",
        "description": "Delete one knowledge document. Requires confirm=true.\n\nRequired scope: `knowledge:delete`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:delete"
        ],
        "x-mint": {
          "title": "Delete document",
          "description": "Delete one knowledge document. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedDocument": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedDocument": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/documents/stats": {
      "get": {
        "operationId": "getKnowledgeDocumentStats",
        "summary": "Get document stats",
        "description": "Get chatbot knowledge document stats.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "Get document stats",
          "description": "Get chatbot knowledge document stats."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search query.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Repeatable source filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Repeatable status filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Repeatable document type filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/documents/delete": {
      "post": {
        "operationId": "deleteKnowledgeDocuments",
        "summary": "Bulk delete documents",
        "description": "Bulk delete knowledge documents by IDs or filters.\n\nRequired scope: `knowledge:delete`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:delete"
        ],
        "x-mint": {
          "title": "Bulk delete documents",
          "description": "Bulk delete knowledge documents by IDs or filters."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "documentIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Specific knowledge document IDs to act on."
                  },
                  "query": {
                    "type": "string"
                  },
                  "sources": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "statuses": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "all",
                      "failed",
                      "pending",
                      "trained"
                    ]
                  },
                  "all": {
                    "type": "boolean",
                    "description": "Select all documents matching the supplied filters."
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "Required true for destructive bulk delete actions."
                  }
                }
              },
              "example": {
                "documentIds": [
                  "document-id"
                ],
                "confirm": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedDocument": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedDocument": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/documents/resync": {
      "post": {
        "operationId": "resyncKnowledgeDocuments",
        "summary": "Bulk resync documents",
        "description": "Bulk resync knowledge documents by IDs or filters.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Bulk resync documents",
          "description": "Bulk resync knowledge documents by IDs or filters."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "documentIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Specific knowledge document IDs to act on."
                  },
                  "query": {
                    "type": "string"
                  },
                  "sources": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "statuses": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "all",
                      "failed",
                      "pending",
                      "trained"
                    ]
                  },
                  "all": {
                    "type": "boolean",
                    "description": "Select all documents matching the supplied filters."
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "Required true for destructive bulk delete actions."
                  }
                }
              },
              "example": {
                "documentIds": [
                  "document-id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/documents/config": {
      "patch": {
        "operationId": "updateKnowledgeDocumentConfig",
        "summary": "Update document config",
        "description": "Update scrape and sync config for one or more URL-like knowledge documents.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Update document config",
          "description": "Update scrape and sync config for one or more URL-like knowledge documents."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "documentIds"
                ],
                "additionalProperties": false,
                "properties": {
                  "documentIds": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  },
                  "syncFrequency": {
                    "type": "string",
                    "enum": [
                      "NEVER",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "default": "NEVER"
                  },
                  "scrapeOptions": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "onlyMainContent": {
                        "type": "boolean",
                        "default": true,
                        "description": "Extract main page content only, excluding headers, footers, sidebars, and navigation."
                      },
                      "includeSelectors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "CSS selectors to include when scraping page content."
                      },
                      "excludeSelectors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "CSS selectors to exclude when scraping page content."
                      },
                      "headers": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Allowed request headers: User-Agent, Accept, Accept-Language."
                      }
                    }
                  },
                  "onlyMainContent": {
                    "type": "boolean",
                    "default": true,
                    "description": "Extract main page content only, excluding headers, footers, sidebars, and navigation."
                  },
                  "includeSelectors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "CSS selectors to include when scraping page content."
                  },
                  "excludeSelectors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "CSS selectors to exclude when scraping page content."
                  },
                  "headers": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Allowed request headers: User-Agent, Accept, Accept-Language."
                  }
                }
              },
              "example": {
                "documentIds": [
                  "document-id"
                ],
                "syncFrequency": "WEEKLY",
                "scrapeOptions": {
                  "onlyMainContent": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/links": {
      "post": {
        "operationId": "addKnowledgeLinks",
        "summary": "Add links",
        "description": "Add URL links to chatbot knowledge.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Add links",
          "description": "Add URL links to chatbot knowledge."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "urls"
                ],
                "additionalProperties": false,
                "properties": {
                  "urls": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1000,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "syncFrequency": {
                    "type": "string",
                    "enum": [
                      "NEVER",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "default": "NEVER"
                  },
                  "scrapeOptions": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "onlyMainContent": {
                        "type": "boolean",
                        "default": true,
                        "description": "Extract main page content only, excluding headers, footers, sidebars, and navigation."
                      },
                      "includeSelectors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "CSS selectors to include when scraping page content."
                      },
                      "excludeSelectors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "CSS selectors to exclude when scraping page content."
                      },
                      "headers": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Allowed request headers: User-Agent, Accept, Accept-Language."
                      }
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              },
              "example": {
                "urls": [
                  "https://example.com/docs"
                ],
                "syncFrequency": "NEVER"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/website": {
      "post": {
        "operationId": "addKnowledgeWebsite",
        "summary": "Add website",
        "description": "Crawl and add a website to chatbot knowledge.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Add website",
          "description": "Crawl and add a website to chatbot knowledge."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "additionalProperties": false,
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "maxDepth": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "default": 3
                  },
                  "maxLinks": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 50
                  },
                  "includePaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "excludePaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "allowedDomains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "syncFrequency": {
                    "type": "string",
                    "enum": [
                      "NEVER",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "default": "NEVER"
                  },
                  "scrapeOptions": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "onlyMainContent": {
                        "type": "boolean",
                        "default": true,
                        "description": "Extract main page content only, excluding headers, footers, sidebars, and navigation."
                      },
                      "includeSelectors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "CSS selectors to include when scraping page content."
                      },
                      "excludeSelectors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "CSS selectors to exclude when scraping page content."
                      },
                      "headers": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Allowed request headers: User-Agent, Accept, Accept-Language."
                      }
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              },
              "example": {
                "url": "https://example.com",
                "maxDepth": 3,
                "maxLinks": 100,
                "scrapeOptions": {
                  "onlyMainContent": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sitemap": {
      "post": {
        "operationId": "addKnowledgeSitemap",
        "summary": "Add sitemap",
        "description": "Ingest a sitemap into chatbot knowledge. Supports auto-sync and sitemap auto-scan frequencies.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Add sitemap",
          "description": "Ingest a sitemap into chatbot knowledge. Supports auto-sync and sitemap auto-scan frequencies."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "additionalProperties": false,
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "maxLinks": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 50
                  },
                  "includePaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "excludePaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "syncFrequency": {
                    "type": "string",
                    "enum": [
                      "NEVER",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "default": "NEVER"
                  },
                  "scanFrequency": {
                    "type": "string",
                    "enum": [
                      "NEVER",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "default": "NEVER"
                  },
                  "scrapeOptions": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "onlyMainContent": {
                        "type": "boolean",
                        "default": true,
                        "description": "Extract main page content only, excluding headers, footers, sidebars, and navigation."
                      },
                      "includeSelectors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "CSS selectors to include when scraping page content."
                      },
                      "excludeSelectors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "CSS selectors to exclude when scraping page content."
                      },
                      "headers": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Allowed request headers: User-Agent, Accept, Accept-Language."
                      }
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              },
              "example": {
                "url": "https://example.com/sitemap.xml",
                "maxLinks": 1000,
                "syncFrequency": "WEEKLY",
                "scanFrequency": "DAILY",
                "scrapeOptions": {
                  "onlyMainContent": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/youtube": {
      "post": {
        "operationId": "addKnowledgeYoutube",
        "summary": "Add YouTube",
        "description": "Add YouTube content to chatbot knowledge.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Add YouTube",
          "description": "Add YouTube content to chatbot knowledge."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "urls"
                ],
                "additionalProperties": false,
                "properties": {
                  "urls": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "syncFrequency": {
                    "type": "string",
                    "enum": [
                      "NEVER",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "default": "NEVER"
                  }
                }
              },
              "example": {
                "urls": [
                  "https://www.youtube.com/watch?v=VIDEO_ID"
                ],
                "syncFrequency": "NEVER"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/text": {
      "post": {
        "operationId": "updateTextKnowledge",
        "summary": "Update text knowledge",
        "description": "Replace the chatbot text knowledge document.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Update text knowledge",
          "description": "Replace the chatbot text knowledge document."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "additionalProperties": false,
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "description": "Optional display name for the text knowledge document."
                  }
                }
              },
              "example": {
                "name": "Company overview",
                "text": "Acme helps teams answer support questions with AI."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/files": {
      "post": {
        "operationId": "uploadKnowledgeFiles",
        "summary": "Upload files",
        "description": "Add local files to chatbot knowledge.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Upload files",
          "description": "Add local files to chatbot knowledge."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "additionalProperties": false,
                "properties": {
                  "files": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "required": [
                        "name",
                        "contentBase64"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "contentBase64": {
                          "type": "string",
                          "description": "Base64 encoded file content. Data URLs are accepted."
                        },
                        "mimeType": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "document": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "document": {
                      "id": "document-id",
                      "name": "Example document",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/ingest-jobs": {
      "get": {
        "operationId": "listKnowledgeSyncJobs",
        "summary": "List sync jobs",
        "description": "List active recurring knowledge sync/scan jobs.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge Sync Jobs"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "List sync jobs",
          "description": "List active recurring knowledge sync/scan jobs."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of records to return.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Repeatable sync job source filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "syncFrequency",
            "in": "query",
            "required": false,
            "description": "Repeatable sync frequency filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "DAILY",
                  "WEEKLY",
                  "MONTHLY"
                ]
              }
            }
          },
          {
            "name": "scanFrequency",
            "in": "query",
            "required": false,
            "description": "Repeatable sitemap scan frequency filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "NEVER",
                  "DAILY",
                  "WEEKLY",
                  "MONTHLY"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "jobs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "jobs": [
                      {
                        "id": "job-id",
                        "name": "Example job",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/ingest-jobs/{jobId}": {
      "get": {
        "operationId": "getKnowledgeSyncJob",
        "summary": "Get sync job",
        "description": "Get one recurring knowledge sync/scan job and run history.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge Sync Jobs"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "Get sync job",
          "description": "Get one recurring knowledge sync/scan job and run history."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "job": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "job": {
                      "id": "job-id",
                      "name": "Example job",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateKnowledgeSyncJob",
        "summary": "Update sync job",
        "description": "Update auto-sync or sitemap auto-scan frequency for a recurring knowledge job.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge Sync Jobs"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Update sync job",
          "description": "Update auto-sync or sitemap auto-scan frequency for a recurring knowledge job."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "syncFrequency": {
                    "type": "string",
                    "enum": [
                      "NEVER",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "default": "NEVER"
                  },
                  "scanFrequency": {
                    "type": "string",
                    "enum": [
                      "NEVER",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "default": "NEVER"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "job": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "job": {
                      "id": "job-id",
                      "name": "Example job",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteKnowledgeSyncJob",
        "summary": "Delete sync job",
        "description": "Disable/delete a recurring knowledge sync/scan job. Existing documents are not deleted. Requires confirm=true.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge Sync Jobs"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Delete sync job",
          "description": "Disable/delete a recurring knowledge sync/scan job. Existing documents are not deleted. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedJob": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedJob": {
                      "id": "job-id",
                      "name": "Example job",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sources": {
      "get": {
        "operationId": "listKnowledgeSources",
        "summary": "List data sources",
        "description": "List external knowledge data-source connections for a chatbot.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "List data sources",
          "description": "List external knowledge data-source connections for a chatbot."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connector",
            "in": "query",
            "required": false,
            "description": "Knowledge source connector filter.",
            "schema": {
              "type": "string",
              "enum": [
                "NOTION",
                "GOOGLE_DRIVE",
                "DROPBOX",
                "ONEDRIVE",
                "BOX",
                "SHAREPOINT",
                "CONFLUENCE",
                "GITHUB"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Repeatable source status filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "PENDING",
                  "ACTIVE",
                  "FAILED",
                  "REVOKED"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "sources": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "sources": [
                      {
                        "id": "source-id",
                        "name": "Example source",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createKnowledgeSource",
        "summary": "Create data source",
        "description": "Create an external knowledge source connection. OAuth/picker sources return an authorization URL. Notion pages are discovered during ingest after OAuth page/database selection.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Create data source",
          "description": "Create an external knowledge source connection. OAuth/picker sources return an authorization URL. Notion pages are discovered during ingest after OAuth page/database selection."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "connector"
                ],
                "additionalProperties": false,
                "properties": {
                  "connector": {
                    "type": "string",
                    "enum": [
                      "NOTION",
                      "GOOGLE_DRIVE",
                      "DROPBOX",
                      "ONEDRIVE",
                      "BOX",
                      "SHAREPOINT",
                      "CONFLUENCE",
                      "GITHUB"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "clientRedirectUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "domain": {
                    "type": "string",
                    "description": "Required for Confluence, for example site.atlassian.net."
                  },
                  "owner": {
                    "type": "string",
                    "description": "Required for GitHub connections."
                  },
                  "connectionLabel": {
                    "type": "string"
                  },
                  "apiKey": {
                    "type": "string",
                    "description": "Required for GitHub connections."
                  }
                }
              },
              "example": {
                "connector": "GOOGLE_DRIVE",
                "name": "Support docs",
                "clientRedirectUrl": "https://sitegpt.ai/agents/files-selected"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "source": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "source": {
                      "id": "source-id",
                      "name": "Example source",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sources/{connectionId}": {
      "get": {
        "operationId": "getKnowledgeSource",
        "summary": "Get data source",
        "description": "Get one external knowledge source connection.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "Get data source",
          "description": "Get one external knowledge source connection."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "source": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "source": {
                      "id": "source-id",
                      "name": "Example source",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateKnowledgeSource",
        "summary": "Update data source",
        "description": "Update an external knowledge source connection name, redirect URL, or credentials.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Update data source",
          "description": "Update an external knowledge source connection name, redirect URL, or credentials."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "clientRedirectUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "apiKey": {
                    "type": "string",
                    "description": "New GitHub personal access token."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "source": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "source": {
                      "id": "source-id",
                      "name": "Example source",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "revokeKnowledgeSource",
        "summary": "Revoke data source",
        "description": "Revoke an external knowledge source connection.\n\nRequired scope: `knowledge:delete`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:delete"
        ],
        "x-mint": {
          "title": "Revoke data source",
          "description": "Revoke an external knowledge source connection."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "source": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "source": {
                      "id": "source-id",
                      "name": "Example source",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sources/{connectionId}/authorize": {
      "post": {
        "operationId": "authorizeKnowledgeSource",
        "summary": "Authorize data source",
        "description": "Generate a fresh authorization/picker URL for an existing OAuth source so users can add/change selected files. For Notion, run ingest after OAuth because selected pages are discovered during ingest.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Authorize data source",
          "description": "Generate a fresh authorization/picker URL for an existing OAuth source so users can add/change selected files. For Notion, run ingest after OAuth because selected pages are discovered during ingest."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "clientRedirectUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "description": "Optional redirect URL after OAuth/picker selection."
                  }
                }
              },
              "example": {
                "clientRedirectUrl": "https://sitegpt.ai/agents/files-selected"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "source": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "source": {
                      "id": "source-id",
                      "name": "Example source",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sources/{connectionId}/documents": {
      "get": {
        "operationId": "listKnowledgeSourceDocuments",
        "summary": "List source documents",
        "description": "List picked/connected documents for a knowledge source. Notion can be empty before ingest because pages are discovered during ingest.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "List source documents",
          "description": "List picked/connected documents for a knowledge source. Notion can be empty before ingest because pages are discovered during ingest."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of documents to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "sources": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "sources": [
                      {
                        "id": "source-id",
                        "name": "Example source",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sources/{connectionId}/ingest": {
      "post": {
        "operationId": "ingestKnowledgeSource",
        "summary": "Ingest data source",
        "description": "Queue ingestion for a knowledge source. Notion discovers selected pages during this step. GitHub uses repository/branch/patterns; Confluence can use external IDs.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Ingest data source",
          "description": "Queue ingestion for a knowledge source. Notion discovers selected pages during this step. GitHub uses repository/branch/patterns; Confluence can use external IDs."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "syncFrequency": {
                    "type": "string",
                    "enum": [
                      "NEVER",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "default": "NEVER"
                  },
                  "repository": {
                    "type": "string",
                    "description": "GitHub repository name."
                  },
                  "branch": {
                    "type": "string",
                    "description": "GitHub branch."
                  },
                  "patterns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "GitHub path patterns."
                  },
                  "externalIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "External document/page IDs, such as Confluence page IDs."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              },
              "example": {
                "syncFrequency": "WEEKLY"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "source": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "source": {
                      "id": "source-id",
                      "name": "Example source",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sources/github/repos": {
      "get": {
        "operationId": "listGitHubSourceRepositories",
        "summary": "List GitHub repositories",
        "description": "List repositories available to a GitHub knowledge source.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "List GitHub repositories",
          "description": "List repositories available to a GitHub knowledge source."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "description": "GitHub source connection ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "GitHub result page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "description": "Repositories per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "sources": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "sources": [
                      {
                        "id": "source-id",
                        "name": "Example source",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sources/github/files": {
      "get": {
        "operationId": "listGitHubSourceFiles",
        "summary": "List GitHub files",
        "description": "List files in a GitHub repository for a knowledge source.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "List GitHub files",
          "description": "List files in a GitHub repository for a knowledge source."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "description": "GitHub source connection ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "description": "GitHub owner.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "query",
            "required": false,
            "description": "GitHub repository name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "description": "GitHub branch.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "sources": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "sources": [
                      {
                        "id": "source-id",
                        "name": "Example source",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sources/confluence/spaces": {
      "get": {
        "operationId": "listConfluenceSourceSpaces",
        "summary": "List Confluence spaces",
        "description": "List spaces available to a Confluence knowledge source.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "List Confluence spaces",
          "description": "List spaces available to a Confluence knowledge source."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "description": "Confluence source connection ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of spaces.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "sources": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "sources": [
                      {
                        "id": "source-id",
                        "name": "Example source",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/knowledge/sources/confluence/pages": {
      "get": {
        "operationId": "listConfluenceSourcePages",
        "summary": "List Confluence pages",
        "description": "List pages in a Confluence space for a knowledge source.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Knowledge Sources"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "List Confluence pages",
          "description": "List pages in a Confluence space for a knowledge source."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "description": "Confluence source connection ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "spaceId",
            "in": "query",
            "required": false,
            "description": "Confluence space ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of pages.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "sources": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "sources": [
                      {
                        "id": "source-id",
                        "name": "Example source",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/custom-responses": {
      "get": {
        "operationId": "listCustomResponses",
        "summary": "List custom responses",
        "description": "List chatbot custom responses.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Custom Responses"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "List custom responses",
          "description": "List chatbot custom responses."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search query.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Custom response state filter.",
            "schema": {
              "type": "string",
              "enum": [
                "ALL",
                "OPEN",
                "UPDATED"
              ]
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Repeatable source filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "customResponses": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "customResponses": [
                      {
                        "id": "customResponse-id",
                        "name": "Example customResponse",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createCustomResponse",
        "summary": "Create custom response",
        "description": "Create a custom response.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Custom Responses"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Create custom response",
          "description": "Create a custom response."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "question",
                  "answer"
                ],
                "additionalProperties": false,
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 1
                  },
                  "answer": {
                    "type": "string",
                    "minLength": 1
                  },
                  "originalAnswer": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "example": {
                "question": "What is your refund policy?",
                "answer": "We offer refunds within 30 days."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "customResponse": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "customResponse": {
                      "id": "customResponse-id",
                      "name": "Example customResponse",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/custom-responses/{customResponseId}": {
      "get": {
        "operationId": "getCustomResponse",
        "summary": "Get custom response",
        "description": "Get one custom response.\n\nRequired scope: `knowledge:read`.",
        "tags": [
          "Custom Responses"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:read"
        ],
        "x-mint": {
          "title": "Get custom response",
          "description": "Get one custom response."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customResponseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "customResponse": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "customResponse": {
                      "id": "customResponse-id",
                      "name": "Example customResponse",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateCustomResponse",
        "summary": "Update custom response",
        "description": "Update a custom response.\n\nRequired scope: `knowledge:write`.",
        "tags": [
          "Custom Responses"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:write"
        ],
        "x-mint": {
          "title": "Update custom response",
          "description": "Update a custom response."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customResponseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 1
                  },
                  "answer": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "customResponse": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "customResponse": {
                      "id": "customResponse-id",
                      "name": "Example customResponse",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteCustomResponse",
        "summary": "Delete custom response",
        "description": "Delete a custom response. Requires confirm=true.\n\nRequired scope: `knowledge:delete`.",
        "tags": [
          "Custom Responses"
        ],
        "security": [
          {
            "bearerAuth": [
              "knowledge:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "knowledge:delete"
        ],
        "x-mint": {
          "title": "Delete custom response",
          "description": "Delete a custom response. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customResponseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedCustomResponse": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedCustomResponse": {
                      "id": "customResponse-id",
                      "name": "Example customResponse",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/personas": {
      "get": {
        "operationId": "listPersonas",
        "summary": "List personas",
        "description": "List chatbot personas.\n\nRequired scope: `personas:read`.",
        "tags": [
          "Personas"
        ],
        "security": [
          {
            "bearerAuth": [
              "personas:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "personas:read"
        ],
        "x-mint": {
          "title": "List personas",
          "description": "List chatbot personas."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "personas": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "personas": [
                      {
                        "id": "persona-id",
                        "name": "Example persona",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createPersona",
        "summary": "Create persona",
        "description": "Create a chatbot persona.\n\nRequired scope: `personas:write`.",
        "tags": [
          "Personas"
        ],
        "security": [
          {
            "bearerAuth": [
              "personas:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "personas:write"
        ],
        "x-mint": {
          "title": "Create persona",
          "description": "Create a chatbot persona."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "instructions"
                ],
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "instructions": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "example": {
                "title": "Friendly support",
                "description": "Warm, concise support tone.",
                "instructions": "Be friendly, direct, and helpful."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "persona": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "persona": {
                      "id": "persona-id",
                      "name": "Example persona",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/personas/{personaId}": {
      "get": {
        "operationId": "getPersona",
        "summary": "Get persona",
        "description": "Get one chatbot persona.\n\nRequired scope: `personas:read`.",
        "tags": [
          "Personas"
        ],
        "security": [
          {
            "bearerAuth": [
              "personas:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "personas:read"
        ],
        "x-mint": {
          "title": "Get persona",
          "description": "Get one chatbot persona."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "personaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "persona": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "persona": {
                      "id": "persona-id",
                      "name": "Example persona",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updatePersona",
        "summary": "Update persona",
        "description": "Update a custom chatbot persona.\n\nRequired scope: `personas:write`.",
        "tags": [
          "Personas"
        ],
        "security": [
          {
            "bearerAuth": [
              "personas:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "personas:write"
        ],
        "x-mint": {
          "title": "Update persona",
          "description": "Update a custom chatbot persona."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "personaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "instructions": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "persona": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "persona": {
                      "id": "persona-id",
                      "name": "Example persona",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deletePersona",
        "summary": "Delete persona",
        "description": "Delete a custom chatbot persona. Requires confirm=true.\n\nRequired scope: `personas:delete`.",
        "tags": [
          "Personas"
        ],
        "security": [
          {
            "bearerAuth": [
              "personas:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "personas:delete"
        ],
        "x-mint": {
          "title": "Delete persona",
          "description": "Delete a custom chatbot persona. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "personaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedPersona": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedPersona": {
                      "id": "persona-id",
                      "name": "Example persona",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/personas/{personaId}/use": {
      "post": {
        "operationId": "usePersona",
        "summary": "Use persona",
        "description": "Make a persona active for a chatbot.\n\nRequired scope: `personas:write`.",
        "tags": [
          "Personas"
        ],
        "security": [
          {
            "bearerAuth": [
              "personas:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "personas:write"
        ],
        "x-mint": {
          "title": "Use persona",
          "description": "Make a persona active for a chatbot."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "personaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "persona": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "persona": {
                      "id": "persona-id",
                      "name": "Example persona",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/instructions": {
      "get": {
        "operationId": "listInstructions",
        "summary": "List instructions",
        "description": "List chatbot instructions.\n\nRequired scope: `instructions:read`.",
        "tags": [
          "Instructions"
        ],
        "security": [
          {
            "bearerAuth": [
              "instructions:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "instructions:read"
        ],
        "x-mint": {
          "title": "List instructions",
          "description": "List chatbot instructions."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "instructions": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "instructions": [
                      {
                        "id": "instruction-id",
                        "name": "Example instruction",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createInstruction",
        "summary": "Create instructions",
        "description": "Create chatbot instructions.\n\nRequired scope: `instructions:write`.",
        "tags": [
          "Instructions"
        ],
        "security": [
          {
            "bearerAuth": [
              "instructions:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "instructions:write"
        ],
        "x-mint": {
          "title": "Create instructions",
          "description": "Create chatbot instructions."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "instructions"
                ],
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "instructions": {
                    "type": "string",
                    "minLength": 1
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  }
                }
              },
              "example": {
                "title": "Support instructions",
                "instructions": "Answer using the knowledge base. Ask a follow-up when needed.",
                "temperature": 0.4
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "instruction": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "instruction": {
                      "id": "instruction-id",
                      "name": "Example instruction",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/instructions/{instructionId}": {
      "get": {
        "operationId": "getInstruction",
        "summary": "Get instructions",
        "description": "Get one chatbot instruction.\n\nRequired scope: `instructions:read`.",
        "tags": [
          "Instructions"
        ],
        "security": [
          {
            "bearerAuth": [
              "instructions:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "instructions:read"
        ],
        "x-mint": {
          "title": "Get instructions",
          "description": "Get one chatbot instruction."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instructionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "instruction": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "instruction": {
                      "id": "instruction-id",
                      "name": "Example instruction",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateInstruction",
        "summary": "Update instructions",
        "description": "Update custom chatbot instructions.\n\nRequired scope: `instructions:write`.",
        "tags": [
          "Instructions"
        ],
        "security": [
          {
            "bearerAuth": [
              "instructions:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "instructions:write"
        ],
        "x-mint": {
          "title": "Update instructions",
          "description": "Update custom chatbot instructions."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instructionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "instructions": {
                    "type": "string",
                    "minLength": 1
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "instruction": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "instruction": {
                      "id": "instruction-id",
                      "name": "Example instruction",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteInstruction",
        "summary": "Delete instructions",
        "description": "Delete custom chatbot instructions. Requires confirm=true.\n\nRequired scope: `instructions:delete`.",
        "tags": [
          "Instructions"
        ],
        "security": [
          {
            "bearerAuth": [
              "instructions:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "instructions:delete"
        ],
        "x-mint": {
          "title": "Delete instructions",
          "description": "Delete custom chatbot instructions. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instructionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedInstruction": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedInstruction": {
                      "id": "instruction-id",
                      "name": "Example instruction",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/instructions/{instructionId}/use": {
      "post": {
        "operationId": "useInstruction",
        "summary": "Use instructions",
        "description": "Make instructions active for a chatbot.\n\nRequired scope: `instructions:write`.",
        "tags": [
          "Instructions"
        ],
        "security": [
          {
            "bearerAuth": [
              "instructions:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "instructions:write"
        ],
        "x-mint": {
          "title": "Use instructions",
          "description": "Make instructions active for a chatbot."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instructionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "instruction": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "instruction": {
                      "id": "instruction-id",
                      "name": "Example instruction",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/settings": {
      "get": {
        "operationId": "getSettings",
        "summary": "Get settings",
        "description": "Get safe chatbot settings.\n\nRequired scope: `settings:read`.",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "bearerAuth": [
              "settings:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "settings:read"
        ],
        "x-mint": {
          "title": "Get settings",
          "description": "Get safe chatbot settings."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "setting": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "setting": {
                      "id": "setting-id",
                      "name": "Example setting",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateSettings",
        "summary": "Update settings",
        "description": "Update safe chatbot settings across sections.\n\nRequired scope: `settings:write`.",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "bearerAuth": [
              "settings:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "settings:write"
        ],
        "x-mint": {
          "title": "Update settings",
          "description": "Update safe chatbot settings across sections."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Partial safe chatbot settings patch. Only public dashboard settings accepted by API v2 can be changed."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "setting": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "setting": {
                      "id": "setting-id",
                      "name": "Example setting",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/settings/{section}": {
      "get": {
        "operationId": "getSettingsSection",
        "summary": "Get settings section",
        "description": "Get one safe chatbot settings section.\n\nRequired scope: `settings:read`.",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "bearerAuth": [
              "settings:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "settings:read"
        ],
        "x-mint": {
          "title": "Get settings section",
          "description": "Get one safe chatbot settings section."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "section",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "setting": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "setting": {
                      "id": "setting-id",
                      "name": "Example setting",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateSettingsSection",
        "summary": "Update settings section",
        "description": "Update one safe chatbot settings section.\n\nRequired scope: `settings:write`.",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "bearerAuth": [
              "settings:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "settings:write"
        ],
        "x-mint": {
          "title": "Update settings section",
          "description": "Update one safe chatbot settings section."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "section",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Partial safe chatbot settings patch. Only public dashboard settings accepted by API v2 can be changed."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "setting": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "setting": {
                      "id": "setting-id",
                      "name": "Example setting",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/starters": {
      "get": {
        "operationId": "listStarters",
        "summary": "List starters",
        "description": "List conversation starters.\n\nRequired scope: `starters:read`.",
        "tags": [
          "Conversation Starters"
        ],
        "security": [
          {
            "bearerAuth": [
              "starters:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "starters:read"
        ],
        "x-mint": {
          "title": "List starters",
          "description": "List conversation starters."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "starters": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "starters": [
                      {
                        "id": "starter-id",
                        "name": "Example starter",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createStarter",
        "summary": "Create starter",
        "description": "Create a conversation starter.\n\nRequired scope: `starters:write`.",
        "tags": [
          "Conversation Starters"
        ],
        "security": [
          {
            "bearerAuth": [
              "starters:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "starters:write"
        ],
        "x-mint": {
          "title": "Create starter",
          "description": "Create a conversation starter."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "message": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "link": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "QUESTION",
                      "LINK"
                    ]
                  },
                  "isEscalationPrompt": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "title": "Pricing",
                "message": "What plans do you offer?",
                "type": "QUESTION"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "starter": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "starter": {
                      "id": "starter-id",
                      "name": "Example starter",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/starters/{starterId}": {
      "get": {
        "operationId": "getStarter",
        "summary": "Get starter",
        "description": "Get one conversation starter.\n\nRequired scope: `starters:read`.",
        "tags": [
          "Conversation Starters"
        ],
        "security": [
          {
            "bearerAuth": [
              "starters:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "starters:read"
        ],
        "x-mint": {
          "title": "Get starter",
          "description": "Get one conversation starter."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "starter": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "starter": {
                      "id": "starter-id",
                      "name": "Example starter",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateStarter",
        "summary": "Update starter",
        "description": "Update a conversation starter.\n\nRequired scope: `starters:write`.",
        "tags": [
          "Conversation Starters"
        ],
        "security": [
          {
            "bearerAuth": [
              "starters:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "starters:write"
        ],
        "x-mint": {
          "title": "Update starter",
          "description": "Update a conversation starter."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "message": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "link": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "QUESTION",
                      "LINK"
                    ]
                  },
                  "isEscalationPrompt": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "starter": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "starter": {
                      "id": "starter-id",
                      "name": "Example starter",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteStarter",
        "summary": "Delete starter",
        "description": "Delete a conversation starter. Requires confirm=true.\n\nRequired scope: `starters:delete`.",
        "tags": [
          "Conversation Starters"
        ],
        "security": [
          {
            "bearerAuth": [
              "starters:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "starters:delete"
        ],
        "x-mint": {
          "title": "Delete starter",
          "description": "Delete a conversation starter. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "starterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedStarter": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedStarter": {
                      "id": "starter-id",
                      "name": "Example starter",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/starters/reorder": {
      "post": {
        "operationId": "reorderStarters",
        "summary": "Reorder starters",
        "description": "Reorder conversation starters.\n\nRequired scope: `starters:write`.",
        "tags": [
          "Conversation Starters"
        ],
        "security": [
          {
            "bearerAuth": [
              "starters:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "starters:write"
        ],
        "x-mint": {
          "title": "Reorder starters",
          "description": "Reorder conversation starters."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderedIds"
                ],
                "additionalProperties": false,
                "properties": {
                  "orderedIds": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "starter": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "starter": {
                      "id": "starter-id",
                      "name": "Example starter",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/followups": {
      "get": {
        "operationId": "listFollowups",
        "summary": "List followups",
        "description": "List conversation followups.\n\nRequired scope: `followups:read`.",
        "tags": [
          "Conversation Followups"
        ],
        "security": [
          {
            "bearerAuth": [
              "followups:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "followups:read"
        ],
        "x-mint": {
          "title": "List followups",
          "description": "List conversation followups."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "followups": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "followups": [
                      {
                        "id": "followup-id",
                        "name": "Example followup",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createFollowup",
        "summary": "Create followup",
        "description": "Create a conversation followup.\n\nRequired scope: `followups:write`.",
        "tags": [
          "Conversation Followups"
        ],
        "security": [
          {
            "bearerAuth": [
              "followups:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "followups:write"
        ],
        "x-mint": {
          "title": "Create followup",
          "description": "Create a conversation followup."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "message": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "link": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "QUESTION",
                      "LINK"
                    ]
                  },
                  "isEscalationPrompt": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "title": "Contact support",
                "link": "https://example.com/contact",
                "type": "LINK"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "followup": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "followup": {
                      "id": "followup-id",
                      "name": "Example followup",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/followups/{followupId}": {
      "get": {
        "operationId": "getFollowup",
        "summary": "Get followup",
        "description": "Get one conversation followup.\n\nRequired scope: `followups:read`.",
        "tags": [
          "Conversation Followups"
        ],
        "security": [
          {
            "bearerAuth": [
              "followups:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "followups:read"
        ],
        "x-mint": {
          "title": "Get followup",
          "description": "Get one conversation followup."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "followupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "followup": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "followup": {
                      "id": "followup-id",
                      "name": "Example followup",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateFollowup",
        "summary": "Update followup",
        "description": "Update a conversation followup.\n\nRequired scope: `followups:write`.",
        "tags": [
          "Conversation Followups"
        ],
        "security": [
          {
            "bearerAuth": [
              "followups:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "followups:write"
        ],
        "x-mint": {
          "title": "Update followup",
          "description": "Update a conversation followup."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "followupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "message": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "link": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "QUESTION",
                      "LINK"
                    ]
                  },
                  "isEscalationPrompt": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "followup": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "followup": {
                      "id": "followup-id",
                      "name": "Example followup",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteFollowup",
        "summary": "Delete followup",
        "description": "Delete a conversation followup. Requires confirm=true.\n\nRequired scope: `followups:delete`.",
        "tags": [
          "Conversation Followups"
        ],
        "security": [
          {
            "bearerAuth": [
              "followups:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "followups:delete"
        ],
        "x-mint": {
          "title": "Delete followup",
          "description": "Delete a conversation followup. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "followupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedFollowup": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedFollowup": {
                      "id": "followup-id",
                      "name": "Example followup",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/followups/reorder": {
      "post": {
        "operationId": "reorderFollowups",
        "summary": "Reorder followups",
        "description": "Reorder conversation followups.\n\nRequired scope: `followups:write`.",
        "tags": [
          "Conversation Followups"
        ],
        "security": [
          {
            "bearerAuth": [
              "followups:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "followups:write"
        ],
        "x-mint": {
          "title": "Reorder followups",
          "description": "Reorder conversation followups."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderedIds"
                ],
                "additionalProperties": false,
                "properties": {
                  "orderedIds": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "followup": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "followup": {
                      "id": "followup-id",
                      "name": "Example followup",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/members": {
      "get": {
        "operationId": "listMembers",
        "summary": "List members",
        "description": "List chatbot members and pending invites.\n\nRequired scope: `members:read`.",
        "tags": [
          "Members"
        ],
        "security": [
          {
            "bearerAuth": [
              "members:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "members:read"
        ],
        "x-mint": {
          "title": "List members",
          "description": "List chatbot members and pending invites."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "members": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pendingInvites": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "members": [
                      {
                        "id": "member-id",
                        "name": "Example member",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "inviteMember",
        "summary": "Invite member",
        "description": "Invite a chatbot member by email, or add them directly with skipInvite=true (no invite email, account provisioned if needed).\n\nRequired scope: `members:write`.",
        "tags": [
          "Members"
        ],
        "security": [
          {
            "bearerAuth": [
              "members:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "members:write"
        ],
        "x-mint": {
          "title": "Invite member",
          "description": "Invite a chatbot member by email, or add them directly with skipInvite=true (no invite email, account provisioned if needed)."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ],
                    "description": "Chatbot member role."
                  },
                  "skipInvite": {
                    "type": "boolean",
                    "description": "If true, add the member directly with no invite email or expiring token; their account is provisioned if it does not exist yet. Returns the member instead of a pending invite."
                  }
                }
              },
              "example": {
                "email": "teammate@example.com",
                "role": "member"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "member": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "member": {
                      "id": "member-id",
                      "name": "Example member",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/members/{userId}": {
      "delete": {
        "operationId": "removeMember",
        "summary": "Remove member",
        "description": "Remove a chatbot member. Requires confirm=true.\n\nRequired scope: `members:delete`.",
        "tags": [
          "Members"
        ],
        "security": [
          {
            "bearerAuth": [
              "members:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "members:delete"
        ],
        "x-mint": {
          "title": "Remove member",
          "description": "Remove a chatbot member. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "member": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "member": {
                      "id": "member-id",
                      "name": "Example member",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/member-invites": {
      "get": {
        "operationId": "listMemberInvites",
        "summary": "List invites",
        "description": "List pending chatbot member invites.\n\nRequired scope: `members:read`.",
        "tags": [
          "Members"
        ],
        "security": [
          {
            "bearerAuth": [
              "members:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "members:read"
        ],
        "x-mint": {
          "title": "List invites",
          "description": "List pending chatbot member invites."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "invites": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "members": [
                      {
                        "id": "member-id",
                        "name": "Example member",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/member-invites/{inviteId}": {
      "delete": {
        "operationId": "cancelMemberInvite",
        "summary": "Cancel invite",
        "description": "Cancel a pending chatbot member invite. Requires confirm=true.\n\nRequired scope: `members:delete`.",
        "tags": [
          "Members"
        ],
        "security": [
          {
            "bearerAuth": [
              "members:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "members:delete"
        ],
        "x-mint": {
          "title": "Cancel invite",
          "description": "Cancel a pending chatbot member invite. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "member": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "member": {
                      "id": "member-id",
                      "name": "Example member",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/leads": {
      "get": {
        "operationId": "listLeads",
        "summary": "List leads",
        "description": "List chatbot leads.\n\nRequired scope: `leads:read`.",
        "tags": [
          "Leads"
        ],
        "security": [
          {
            "bearerAuth": [
              "leads:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "leads:read"
        ],
        "x-mint": {
          "title": "List leads",
          "description": "List chatbot leads."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of records to return.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Lead status filter.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "open",
                "archived"
              ]
            }
          },
          {
            "name": "important",
            "in": "query",
            "required": false,
            "description": "Important flag filter.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search query.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "leads": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "leads": [
                      {
                        "id": "lead-id",
                        "name": "Example lead",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/leads/{leadId}": {
      "get": {
        "operationId": "getLead",
        "summary": "Get lead",
        "description": "Get one chatbot lead.\n\nRequired scope: `leads:read`.",
        "tags": [
          "Leads"
        ],
        "security": [
          {
            "bearerAuth": [
              "leads:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "leads:read"
        ],
        "x-mint": {
          "title": "Get lead",
          "description": "Get one chatbot lead."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "lead": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "lead": {
                      "id": "lead-id",
                      "name": "Example lead",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateLead",
        "summary": "Update lead",
        "description": "Update a chatbot lead.\n\nRequired scope: `leads:write`.",
        "tags": [
          "Leads"
        ],
        "security": [
          {
            "bearerAuth": [
              "leads:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "leads:write"
        ],
        "x-mint": {
          "title": "Update lead",
          "description": "Update a chatbot lead."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "important": {
                    "type": "boolean"
                  },
                  "archived": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "important": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "lead": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "lead": {
                      "id": "lead-id",
                      "name": "Example lead",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteLead",
        "summary": "Delete lead",
        "description": "Delete a chatbot lead. Requires confirm=true.\n\nRequired scope: `leads:delete`.",
        "tags": [
          "Leads"
        ],
        "security": [
          {
            "bearerAuth": [
              "leads:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "leads:delete"
        ],
        "x-mint": {
          "title": "Delete lead",
          "description": "Delete a chatbot lead. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedLead": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedLead": {
                      "id": "lead-id",
                      "name": "Example lead",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/leads/actions": {
      "post": {
        "operationId": "runLeadAction",
        "summary": "Run lead action",
        "description": "Run a bulk lead action.\n\nRequired scope: `leads:write`.",
        "tags": [
          "Leads"
        ],
        "security": [
          {
            "bearerAuth": [
              "leads:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "leads:write"
        ],
        "x-mint": {
          "title": "Run lead action",
          "description": "Run a bulk lead action."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action",
                  "leadIds"
                ],
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "archive",
                      "delete",
                      "star",
                      "unarchive",
                      "unstar"
                    ]
                  },
                  "leadIds": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "Required true for bulk delete."
                  }
                }
              },
              "example": {
                "action": "star",
                "leadIds": [
                  "lead-id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "action": {
                          "type": "string"
                        },
                        "leads": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "action": "star",
                    "leads": [
                      {
                        "id": "lead-id",
                        "name": "Example lead",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ]
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/conversations": {
      "get": {
        "operationId": "listConversations",
        "summary": "List conversations",
        "description": "List chatbot conversations.\n\nRequired scope: `conversations:read`.",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:read"
        ],
        "x-mint": {
          "title": "List conversations",
          "description": "List chatbot conversations."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of records to return.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Conversation status filter.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "open",
                "resolved"
              ]
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "description": "Conversation mode filter.",
            "schema": {
              "type": "string",
              "enum": [
                "AI",
                "AGENT"
              ]
            }
          },
          {
            "name": "important",
            "in": "query",
            "required": false,
            "description": "Important flag filter.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "escalated",
            "in": "query",
            "required": false,
            "description": "Escalated flag filter.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "read",
            "in": "query",
            "required": false,
            "description": "Read flag filter.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "leadId",
            "in": "query",
            "required": false,
            "description": "Lead ID filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "query",
            "required": false,
            "description": "Repeatable tag ID filter.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "reaction",
            "in": "query",
            "required": false,
            "description": "Message reaction filter.",
            "schema": {
              "type": "string",
              "enum": [
                "NEGATIVE",
                "POSITIVE"
              ]
            }
          },
          {
            "name": "gptModel",
            "in": "query",
            "required": false,
            "description": "GPT model bucket filter.",
            "schema": {
              "type": "string",
              "enum": [
                "gpt-3.5",
                "gpt-4"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search query.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeEmpty",
            "in": "query",
            "required": false,
            "description": "Include empty conversations.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "scanLimit",
            "in": "query",
            "required": false,
            "description": "Maximum conversations to scan for filters.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "conversations": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "conversations": [
                      {
                        "id": "conversation-id",
                        "name": "Example conversation",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createConversation",
        "summary": "Create conversation",
        "description": "Create a chatbot conversation.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Create conversation",
          "description": "Create a chatbot conversation."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "threadId": {
                    "type": "string"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "AI",
                      "AGENT"
                    ]
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "tagIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "chatUser": {
                    "type": "object",
                    "required": [
                      "email"
                    ],
                    "additionalProperties": true,
                    "properties": {
                      "email": {
                        "type": "string",
                        "format": "email"
                      },
                      "name": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      },
                      "customData": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "pageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "sessionId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "example": {
                "title": "Pricing question",
                "chatUser": {
                  "email": "customer@example.com",
                  "name": "Customer"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "conversation": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "conversation": {
                      "id": "conversation-id",
                      "name": "Example conversation",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/conversations/bulk": {
      "post": {
        "operationId": "runConversationAction",
        "summary": "Run conversation action",
        "description": "Run a bulk conversation action.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Run conversation action",
          "description": "Run a bulk conversation action."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action",
                  "threadIds"
                ],
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "delete",
                      "mark-read",
                      "mark-unread",
                      "resolve",
                      "star",
                      "unresolve",
                      "unstar"
                    ]
                  },
                  "threadIds": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "Required true for bulk delete."
                  }
                }
              },
              "example": {
                "action": "mark-read",
                "threadIds": [
                  "thread-id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "action": {
                          "type": "string"
                        },
                        "conversations": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "action": "star",
                    "conversations": [
                      {
                        "id": "conversation-id",
                        "name": "Example conversation",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ]
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/conversations/{threadId}": {
      "get": {
        "operationId": "getConversation",
        "summary": "Get conversation",
        "description": "Get one chatbot conversation.\n\nRequired scope: `conversations:read`.",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:read"
        ],
        "x-mint": {
          "title": "Get conversation",
          "description": "Get one chatbot conversation."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "conversation": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "conversation": {
                      "id": "conversation-id",
                      "name": "Example conversation",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateConversation",
        "summary": "Update conversation",
        "description": "Update one chatbot conversation.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Update conversation",
          "description": "Update one chatbot conversation."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "threadId": {
                    "type": "string"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "AI",
                      "AGENT"
                    ]
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "tagIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "chatUser": {
                    "type": "object",
                    "required": [
                      "email"
                    ],
                    "additionalProperties": true,
                    "properties": {
                      "email": {
                        "type": "string",
                        "format": "email"
                      },
                      "name": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      },
                      "customData": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "nullable": true
                  },
                  "pageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "sessionId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "important": {
                    "type": "boolean"
                  },
                  "resolved": {
                    "type": "boolean"
                  },
                  "escalated": {
                    "type": "boolean"
                  },
                  "webhookUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "webhookToken": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "markRead": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "important": true,
                "tagIds": [
                  "tag-id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "conversation": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "conversation": {
                      "id": "conversation-id",
                      "name": "Example conversation",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteConversation",
        "summary": "Delete conversation",
        "description": "Delete one chatbot conversation. Requires confirm=true.\n\nRequired scope: `conversations:delete`.",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:delete"
        ],
        "x-mint": {
          "title": "Delete conversation",
          "description": "Delete one chatbot conversation. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedConversation": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedConversation": {
                      "id": "conversation-id",
                      "name": "Example conversation",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/conversations/{threadId}/escalate": {
      "post": {
        "operationId": "escalateConversation",
        "summary": "Escalate conversation",
        "description": "Escalate a conversation to human support.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Escalate conversation",
          "description": "Escalate a conversation to human support."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Optional note to add when switching conversation mode."
                  }
                }
              },
              "example": {
                "message": "Please follow up with this customer."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "conversation": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "conversation": {
                      "id": "conversation-id",
                      "name": "Example conversation",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/conversations/{threadId}/switch-to-ai": {
      "post": {
        "operationId": "switchConversationToAi",
        "summary": "Switch to AI",
        "description": "Switch an escalated conversation back to AI mode.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Conversations"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Switch to AI",
          "description": "Switch an escalated conversation back to AI mode."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Optional note to add when switching conversation mode."
                  }
                }
              },
              "example": {
                "message": "Switching back to AI support."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "conversation": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "conversation": {
                      "id": "conversation-id",
                      "name": "Example conversation",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/messages": {
      "post": {
        "operationId": "sendMessageToNewConversation",
        "summary": "Send new message",
        "description": "Send a visitor message and start a new conversation.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Send new message",
          "description": "Send a visitor message and start a new conversation."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message"
                ],
                "additionalProperties": false,
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1
                  },
                  "pageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  }
                }
              },
              "example": {
                "message": "Can you explain your pricing?"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "message": {
                      "id": "message-id",
                      "name": "Example message",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/conversations/{threadId}/messages": {
      "get": {
        "operationId": "listConversationMessages",
        "summary": "List messages",
        "description": "List conversation messages.\n\nRequired scope: `conversations:read`.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:read"
        ],
        "x-mint": {
          "title": "List messages",
          "description": "List conversation messages."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of records to return.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "messages": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "messages": [
                      {
                        "id": "message-id",
                        "name": "Example message",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "sendConversationMessage",
        "summary": "Send message",
        "description": "Send a visitor message to an existing conversation.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Send message",
          "description": "Send a visitor message to an existing conversation."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message"
                ],
                "additionalProperties": false,
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1
                  },
                  "pageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  }
                }
              },
              "example": {
                "message": "I have one more question."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "message": {
                      "id": "message-id",
                      "name": "Example message",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/conversations/{threadId}/messages/{messageId}": {
      "patch": {
        "operationId": "updateConversationMessage",
        "summary": "Update message",
        "description": "React to or edit a conversation message.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Update message",
          "description": "React to or edit a conversation message."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "reaction": {
                    "type": "string",
                    "enum": [
                      "NEGATIVE",
                      "NEUTRAL",
                      "POSITIVE"
                    ]
                  },
                  "text": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "reaction": "POSITIVE"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "message": {
                      "id": "message-id",
                      "name": "Example message",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/tags": {
      "get": {
        "operationId": "listTags",
        "summary": "List tags",
        "description": "List conversation tags.\n\nRequired scope: `conversations:read`.",
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:read"
        ],
        "x-mint": {
          "title": "List tags",
          "description": "List conversation tags."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search query.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "tags": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GenericObject"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "tags": [
                      {
                        "id": "tag-id",
                        "name": "Example tag",
                        "createdAt": "2026-05-13T00:00:00.000Z"
                      }
                    ],
                    "pagination": {
                      "limit": 20,
                      "hasNextPage": false,
                      "nextCursor": null
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "post": {
        "operationId": "createTag",
        "summary": "Create tag",
        "description": "Create a conversation tag.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Create tag",
          "description": "Create a conversation tag."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "example": {
                "title": "VIP"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "tag": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "tag": {
                      "id": "tag-id",
                      "name": "Example tag",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    },
    "/api/v2/chatbots/{chatbotId}/tags/{tagId}": {
      "get": {
        "operationId": "getTag",
        "summary": "Get tag",
        "description": "Get one conversation tag.\n\nRequired scope: `conversations:read`.",
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:read"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:read"
        ],
        "x-mint": {
          "title": "Get tag",
          "description": "Get one conversation tag."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "tag": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "tag": {
                      "id": "tag-id",
                      "name": "Example tag",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "patch": {
        "operationId": "updateTag",
        "summary": "Update tag",
        "description": "Update a conversation tag.\n\nRequired scope: `conversations:write`.",
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:write"
        ],
        "x-mint": {
          "title": "Update tag",
          "description": "Update a conversation tag."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "example": {
                "title": "Enterprise"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "tag": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "tag": {
                      "id": "tag-id",
                      "name": "Example tag",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      },
      "delete": {
        "operationId": "deleteTag",
        "summary": "Delete tag",
        "description": "Delete a conversation tag. Requires confirm=true.\n\nRequired scope: `conversations:delete`.",
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "bearerAuth": [
              "conversations:delete"
            ]
          }
        ],
        "x-sitegpt-auth": "bearer",
        "x-sitegpt-scopes": [
          "conversations:delete"
        ],
        "x-mint": {
          "title": "Delete tag",
          "description": "Delete a conversation tag. Requires confirm=true."
        },
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "description": "Required true for destructive actions.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful SiteGPT API v2 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "deletedTag": {
                          "$ref": "#/components/schemas/GenericObject"
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AgentResponseMeta"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "ok": true,
                  "data": {
                    "deletedTag": {
                      "id": "tag-id",
                      "name": "Example tag",
                      "createdAt": "2026-05-13T00:00:00.000Z"
                    }
                  },
                  "meta": {
                    "requestId": "request-id"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AgentError"
          },
          "401": {
            "$ref": "#/components/responses/AgentError"
          },
          "403": {
            "$ref": "#/components/responses/AgentError"
          },
          "404": {
            "$ref": "#/components/responses/AgentError"
          },
          "405": {
            "$ref": "#/components/responses/AgentError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "SiteGPT API token"
      }
    },
    "schemas": {
      "AgentResponseMeta": {
        "type": "object",
        "required": [
          "requestId"
        ],
        "properties": {
          "requestId": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "AgentSuccess": {
        "type": "object",
        "required": [
          "ok",
          "data",
          "meta"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/GenericObject"
          },
          "meta": {
            "$ref": "#/components/schemas/AgentResponseMeta"
          }
        },
        "additionalProperties": false
      },
      "AgentError": {
        "type": "object",
        "required": [
          "ok",
          "error",
          "meta"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "details": {}
            },
            "additionalProperties": false
          },
          "meta": {
            "type": "object",
            "required": [
              "requestId"
            ],
            "properties": {
              "requestId": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": false
      },
      "GenericObject": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "responses": {
      "AgentError": {
        "description": "SiteGPT agent API error response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentError"
            }
          }
        }
      }
    }
  }
}