{
    "variable": [
        {
            "id": "baseUrl",
            "key": "baseUrl",
            "type": "string",
            "name": "string",
            "value": "https:\/\/onoxia.nz"
        }
    ],
    "info": {
        "name": "ONOXIA API",
        "_postman_id": "78000072-8535-42ee-b883-a8f3ddc1d176",
        "description": "RESTful API zur programmatischen Verwaltung Ihrer ONOXIA-Chatbots.",
        "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
    },
    "item": [
        {
            "name": "Webhooks",
            "description": "",
            "item": [
                {
                    "name": "List webhooks",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/webhooks",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/webhooks"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns all registered webhooks (bot tools) for this chatbot. Webhooks enable the bot to\ncall external systems during conversations \u2014 e.g. capturing leads to a CRM, creating support\ntickets, or triggering custom workflows. Each webhook has a name, URL, event triggers, and\nan optional HMAC secret for signature verification.\n\nRequires: `webhooks:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Create a webhook",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/webhooks",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/webhooks"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"b\",\"url\":\"http:\\\/\\\/bailey.com\\\/\",\"secret\":\"m\",\"description\":\"Et fugiat sunt nihil accusantium.\",\"is_active\":true}"
                        },
                        "description": "Registers a new webhook (bot tool). The bot will call this URL when the configured\nevents or triggers match during a conversation. Payloads are signed with HMAC-SHA256\nusing the optional `secret` field.\n\nThe `trigger_config` object defines when the bot should use this tool \u2014 provide a\n`tool_name` and `tool_description` that the LLM uses to decide when to invoke it.\n\nAfter creation, the bot is re-provisioned to include the new tool in its capabilities.\n\nRequires: `webhooks:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Update a webhook",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/webhooks\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/webhooks\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "architecto",
                                    "description": "The ID of the webhook."
                                }
                            ]
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"b\",\"url\":\"http:\\\/\\\/bailey.com\\\/\",\"secret\":\"m\",\"description\":\"Et fugiat sunt nihil accusantium.\",\"is_active\":true}"
                        },
                        "description": "Updates an existing webhook by ID. Only send the fields you want to change.\nThe bot is re-provisioned after update to reflect changes in tool capabilities.\n\nRequires: `webhooks:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Delete a webhook",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/webhooks\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/webhooks\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "architecto",
                                    "description": "The ID of the webhook."
                                }
                            ]
                        },
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Permanently removes a webhook. The bot will no longer have access to this tool.\nThe bot is re-provisioned after deletion.\n\nRequires: `webhooks:write` permission."
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Chat",
            "description": "",
            "item": [
                {
                    "name": "Chat with the bot",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/chat",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/chat"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"message\":\"b\",\"conversation_id\":\"a4855dc5-0acb-33c3-b921-f4291f719ca0\",\"visitor_id\":\"z\",\"locale\":\"en_CA\"}"
                        },
                        "description": "Send a message to the bot and receive an AI-generated response. This endpoint uses the same\nflow as the chat widget: RAG knowledge retrieval, tool execution, token budget deduction.\n\nPass a `conversation_id` to continue an existing conversation, or omit it to start a new one.\nThe response includes the conversation ID for subsequent messages.\n\nThe `locale` parameter hints the bot about the visitor's language. With auto-detection enabled,\nthe bot will respond in whatever language the user writes in regardless of this parameter.\n\nToken usage is deducted from your monthly budget. Returns 429 if budget is exhausted.\n\nRequires: `chat:write` permission."
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Leads",
            "description": "",
            "item": [
                {
                    "name": "Export leads as CSV",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/leads\/export.csv",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/leads\/export.csv"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Downloads all leads for this chatbot as a CSV file. Includes name, email, phone, company,\nsource, and creation date. Useful for importing into CRM systems or spreadsheets.\n\nRequires: `leads:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "List leads",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/leads",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/leads"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns a paginated list of captured leads. Leads are created when visitors provide their\ncontact information through the pre-chat form or during bot conversations.\n\nFilters: `?since=2026-01-01`, `?source=prechat` (or `bot`, `manual`).\nPagination: `?per_page=50` (max 100).\n\nRequires: `leads:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Analytics",
            "description": "",
            "item": [
                {
                    "name": "Token usage analytics",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/analytics\/tokens",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/analytics\/tokens"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns your current token budget (monthly limit, used, remaining) and daily usage\nbreakdown for this chatbot. Filter by date range with `?from=2026-03-01&to=2026-03-31`.\n\nEach day shows input tokens, output tokens, and total. Use this to monitor consumption,\ndetect usage spikes, and plan token package purchases.\n\nRequires: `analytics:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Conversation statistics",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/analytics\/conversations",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/analytics\/conversations"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns aggregate statistics: total conversations, rated conversations, average CSAT rating,\nand a breakdown by channel (widget, email, api). Use this for dashboard widgets or\nreporting integrations.\n\nRequires: `analytics:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Import",
            "description": "",
            "item": [
                {
                    "name": "Import llms.txt",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/ingest\/llms-txt",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/ingest\/llms-txt"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"url\":\"http:\\\/\\\/www.bailey.biz\\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",\"content\":\"architecto\"}"
                        },
                        "description": "Imports a website's `llms.txt` file as RAG knowledge. This is a standardized format\n(llms-txt.org) that describes a website's content for AI consumption.\n\nProvide either a `url` (the system fetches it) or raw `content` (inline import).\nThe content is parsed, split into chunks, and embedded as RAG sources.\nProcessing happens asynchronously \u2014 check back via the RAG list endpoint.\n\nRequires: `rag:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Import sitemap",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/ingest\/sitemap",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/ingest\/sitemap"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"url\":\"http:\\\/\\\/www.bailey.biz\\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",\"max_pages\":5}"
                        },
                        "description": "Imports a website's XML sitemap and creates RAG sources from the linked pages.\nThe system fetches each page, extracts text content, and creates knowledge entries.\n\nUse `max_pages` to limit the number of pages processed (default: all, max: 500).\nUse `exclude_patterns` to skip certain URL patterns (e.g. `[\"\/admin\/*\", \"\/tag\/*\"]`).\n\nProcessing happens asynchronously. Monitor progress via the RAG list endpoint.\n\nRequires: `rag:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Import single URL",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/ingest\/url",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/ingest\/url"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"url\":\"http:\\\/\\\/www.bailey.biz\\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",\"name\":\"i\"}"
                        },
                        "description": "Fetches a single web page, extracts its text content, and creates a RAG source from it.\nUseful for importing specific pages (e.g. a pricing page, product page, or help article)\nwithout processing an entire sitemap.\n\nOptional: Set a custom `name`, `context_tags`, or `url_patterns` for the created source.\n\nRequires: `rag:write` permission."
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Raw LLM",
            "description": "",
            "item": [
                {
                    "name": "Raw LLM Proxy",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/llm\/chat",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/llm\/chat"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"messages\":[{\"role\":\"assistant\",\"content\":\"architecto\"}],\"model\":\"b\",\"temperature\":2,\"max_tokens\":7}"
                        },
                        "description": "Direct access to the underlying LLM without RAG, tools, or conversation context.\nSend your own message array and get a raw AI response. Tokens are deducted from your budget.\n\nOptionally specify a `model` (e.g. `mistral-medium`, `qwen-3.5-plus`, `gemini-2.5-flash`).\nIf omitted, the system auto-selects the best model for the bot's configured language.\n\nUse cases: content generation, translation, summarization, classification \u2014 anything\nthat needs AI but doesn't require your knowledge base.\n\nNote: Different models have different token multipliers. Gemini Flash (0.5x) is the\ncheapest option, Mistral Medium (1.0x) is the default.\n\nRequires: `llm:write` permission."
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Conversations",
            "description": "",
            "item": [
                {
                    "name": "List conversations",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/conversations",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/conversations"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns a paginated list of conversations for this chatbot. Each conversation includes\nmetadata like visitor ID, channel (widget\/email), status (bot\/agent\/closed), locale,\nmessage count, and CSAT rating.\n\nFilters: `?status=bot`, `?channel=widget`, `?since=2026-01-01`, `?rated=true`.\nPagination: `?per_page=50` (max 100).\n\nRequires: `conversations:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get conversation details",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/conversations\/:uuid",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/conversations\/:uuid",
                            "variable": [
                                {
                                    "id": "uuid",
                                    "key": "uuid",
                                    "value": "6ff8f7f6-1eb3-3525-be4a-3932c805afed",
                                    "description": ""
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns a single conversation with its full message history. Messages are ordered\nchronologically and include role (user\/assistant\/agent), content, token count,\nand timestamp. Useful for auditing, analytics, or building custom conversation UIs.\n\nRequires: `conversations:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "RAG Sources",
            "description": "",
            "item": [
                {
                    "name": "List RAG sources",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/rag",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/rag"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns all knowledge sources (RAG) for this chatbot. Each source has a type (faq, text, document),\na processing status, and optional context filters (tags, URL patterns).\nFilter by `?status=ready` to see only processed sources, or `?status=pending` for queued ones.\n\nRequires: `rag:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Create a RAG source",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/rag",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/rag"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"type\":\"text\",\"name\":\"b\",\"question\":\"architecto\",\"answer\":\"architecto\"}"
                        },
                        "description": "Creates a new knowledge source for the bot. Supported types: `faq` (question + answer pair)\nand `text` (free-form text\/markdown). After creation, the source is automatically queued for\nprocessing \u2014 vector embeddings are generated and stored in Qdrant.\n\nOptional: Add `context_tags` or `url_patterns` to restrict when this source is used.\nFor example, a product FAQ with `url_patterns: [\"\/products\/*\"]` will only be searched\nwhen visitors are on product pages.\n\nRequires: `rag:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Bulk sync RAG sources",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/rag\/sync",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/rag\/sync"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"sources\":[{\"name\":\"b\",\"type\":\"text\",\"answer\":\"architecto\",\"question\":\"architecto\"}],\"delete_missing\":true}"
                        },
                        "description": "Upsert + delete in a single request. Ideal for CMS plugins that sync page content automatically.\nSources are matched by `name` \u2014 existing sources with the same name are updated, new names are created.\n\nWith `delete_missing: true`, any API-created sources (`source: \"api\"`) whose names are NOT in the\nrequest body will be deleted. Manually created sources (via dashboard) are never deleted by sync.\n\nReturns a summary: `{ created, updated, deleted, unchanged }`.\n\nRequires: `rag:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Update a RAG source",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/rag\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/rag\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "architecto",
                                    "description": "The ID of the rag."
                                }
                            ]
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"b\",\"question\":\"architecto\",\"answer\":\"architecto\"}"
                        },
                        "description": "Updates an existing knowledge source by ID. The source is automatically re-processed after update\n(new embeddings are generated). Only send the fields you want to change.\n\nNote: Changing the `answer` or `question` triggers re-embedding, which may take a few seconds.\n\nRequires: `rag:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Delete a RAG source",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/rag\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/rag\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "architecto",
                                    "description": "The ID of the rag."
                                }
                            ]
                        },
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Permanently deletes a knowledge source and all its vector chunks. The bot will no longer\nreference this content. The Qdrant collection is automatically re-provisioned.\n\nRequires: `rag:write` permission."
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Schedules",
            "description": "",
            "item": [
                {
                    "name": "List schedules",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/schedules",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/schedules"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns all schedule rules for this chatbot. Schedules control when the bot is active,\ninactive, or displays a custom message. Use them to implement business hours, holiday\nmessages, or time-based bot behavior.\n\nEach schedule has an action (`on`, `off`, `message`), time range, optional weekday filter,\ndate range, timezone, and priority (higher number = higher priority).\n\nRequires: `schedules:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Create a schedule",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/schedules",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/schedules"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"b\",\"action\":\"message\",\"message\":\"architecto\",\"time_from\":\"13:57\",\"time_to\":\"13:57\",\"date_from\":\"2026-07-28T13:57:36\",\"date_to\":\"2026-07-28T13:57:36\",\"timezone\":\"Asia\\\/Ulaanbaatar\",\"use_browser_timezone\":false,\"priority\":84,\"is_active\":false}"
                        },
                        "description": "Creates a new schedule rule. Actions: `on` (activate bot), `off` (deactivate bot),\n`message` (show custom text instead of bot response).\n\nWeekdays are optional \u2014 empty array means the schedule applies every day.\nUse `0` for Sunday through `6` for Saturday.\n\nThe `use_browser_timezone` flag makes the schedule use the visitor's local time\n(detected from the browser). Otherwise, the `timezone` field is used.\n\nRequires: `schedules:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Update a schedule",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/schedules\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/schedules\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "architecto",
                                    "description": "The ID of the schedule."
                                }
                            ]
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"b\",\"action\":\"message\",\"message\":\"architecto\",\"time_from\":\"13:57\",\"time_to\":\"13:57\",\"date_from\":\"2026-07-28T13:57:36\",\"date_to\":\"2026-07-28T13:57:36\",\"timezone\":\"Asia\\\/Ulaanbaatar\",\"use_browser_timezone\":true,\"priority\":84,\"is_active\":false}"
                        },
                        "description": "Updates an existing schedule rule by ID. Only send the fields you want to change.\n\nRequires: `schedules:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Delete a schedule",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/schedules\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/schedules\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "architecto",
                                    "description": "The ID of the schedule."
                                }
                            ]
                        },
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Permanently deletes a schedule rule by ID.\n\nRequires: `schedules:write` permission."
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Site (Bot Config)",
            "description": "",
            "item": [
                {
                    "name": "Read bot configuration",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/site",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/site"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns the full configuration of the chatbot bound to this API token, including widget settings,\nsystem prompt, bot rules, languages, and usage counters (RAG sources, conversations, webhooks, leads).\nUse this to verify your token is working and to inspect the current bot setup.\n\nRequires: `site:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Update bot settings",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/site",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/site"
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"b\",\"system_prompt\":\"n\",\"response_length\":\"medium\",\"is_active\":false,\"privacy_text\":\"architecto\",\"privacy_url\":\"http:\\\/\\\/bailey.com\\\/\"}"
                        },
                        "description": "Partially updates the chatbot configuration. Only send the fields you want to change.\nJSON fields (`widget_config`, `bot_rules`, `handover_config`) are **merged** with existing values,\nnot replaced \u2014 so you can update individual keys without losing others.\n\nIf you change the `system_prompt` or `bot_rules`, the bot is automatically re-provisioned\n(RAG embeddings are rebuilt). This may take a few seconds.\n\nRequires: `site:write` permission."
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Support Agents",
            "description": "",
            "item": [
                {
                    "name": "List support agents",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/agents",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/agents"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns all support agents for your account with their assigned sites and online status.\nSupport agents are used for the Live Chat \/ Handover feature \u2014 they can take over bot\nconversations and chat directly with visitors.\n\nRequires: `agents:read` permission."
                    },
                    "response": [
                        {
                            "header": [
                                {
                                    "key": "cache-control",
                                    "value": "no-cache, private"
                                },
                                {
                                    "key": "content-type",
                                    "value": "application\/json"
                                },
                                {
                                    "key": "access-control-allow-origin",
                                    "value": "*"
                                }
                            ],
                            "code": 401,
                            "body": "{\"message\":\"Unauthenticated.\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Create a support agent",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/agents",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/agents"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"b\",\"email\":\"zbailey@example.net\",\"password\":\"-0pBNvYgxw\",\"locale\":\"de\"}"
                        },
                        "description": "Creates a new support agent who can log in at `\/support` and handle live chat handovers.\nAgents must be assigned to at least one site via `site_ids` (array of site UUIDs).\nThe agent receives their own login credentials (email + password) separate from the tenant account.\n\nRequires: `agents:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Update a support agent",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/agents\/:uuid",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/agents\/:uuid",
                            "variable": [
                                {
                                    "id": "uuid",
                                    "key": "uuid",
                                    "value": "6ff8f7f6-1eb3-3525-be4a-3932c805afed",
                                    "description": ""
                                }
                            ]
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"b\",\"email\":\"zbailey@example.net\",\"password\":\"-0pBNvYgxw\",\"locale\":\"en\",\"is_active\":true}"
                        },
                        "description": "Updates an existing support agent by UUID. You can change name, email, password, locale,\nactive status, and site assignments. Only send the fields you want to change.\n\nRequires: `agents:write` permission."
                    },
                    "response": []
                },
                {
                    "name": "Delete a support agent",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/bot\/agents\/:uuid",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/bot\/agents\/:uuid",
                            "variable": [
                                {
                                    "id": "uuid",
                                    "key": "uuid",
                                    "value": "6ff8f7f6-1eb3-3525-be4a-3932c805afed",
                                    "description": ""
                                }
                            ]
                        },
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Permanently deletes a support agent. The agent will no longer be able to log in or handle\nconversations. Active conversations assigned to this agent are returned to the bot.\n\nRequires: `agents:write` permission."
                    },
                    "response": []
                }
            ]
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "Authorization",
                "type": "string"
            }
        ]
    }
}