For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Upsert categories

This endpoint creates and updates categories in one call. An entry with no id is created. An entry with an id is updated.

An id that does not match a category in your organization is reported as an error rather than created, so that a stale ID cannot quietly produce a duplicate.

Endpoint

POST api/categories/bulk-upsert/

Example Request Payload

{
    "allow_partial": true,
    "categories": [
        {
            "id": "d610ab31-e480-4ef1-9e35-94f94ebacde9",
            "title": "Community Outreach",
            "description": "Updated description."
        },
        {
            "title": "Emergency Response"
        }
    ]
}

Behavior

  • Entries without an id follow the same rules as Create categories, including your organization's chat default.

  • Entries with an id follow the same rules as Update categories, changing only the fields you send.